From dfe9dd07d21b76f2eac6daf5614539b26eebfcb8 Mon Sep 17 00:00:00 2001 From: Hector Gimenez Date: Sun, 2 Apr 2023 23:18:25 +0900 Subject: [PATCH] Add support for Ubuntu 22.04 and MongoDB 6.0 --- meta/main.yml | 1 + tasks/install.debian.yml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/meta/main.yml b/meta/main.yml index b677854..39bddae 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -17,6 +17,7 @@ galaxy_info: - xenial - bionic - focal + - jammy - name: Debian versions: - jessie diff --git a/tasks/install.debian.yml b/tasks/install.debian.yml index e1ba5fe..59dfcd7 100644 --- a/tasks/install.debian.yml +++ b/tasks/install.debian.yml @@ -70,11 +70,21 @@ - ansible_distribution_release == "focal" tags: [mongodb, mongos, mongodb-install, mongos-install] +- name: Fail When Using Wrong mongodb_version Variable with Ubuntu 22.04 (Jammy) + fail: + msg: "mongodb_version variable should be '6.0' for Ubuntu 22.04 (Jammy)" + when: + - mongodb_package == 'mongodb-org' + - mongos_package == 'mongodb-org-mongos' + - mongodb_major_version is not regex("6.0") + - ansible_distribution_release == "jammy" + tags: [mongodb, mongos, mongodb-install, mongos-install] + - name: Fail When Using Wrong ansible_distribution_release fail: - msg: "ansible_distribution_release should be 'Debian 8 (Jessie)' or 'Debian 9 (Stretch)' or 'Debian 10 (Buster)' or 'Debian 11 (Bullseye)' or 'Ubuntu 16.04 (Xenial)' or 'Ubuntu 18.04 (Bionic)' or 'Ubuntu 20.04 (Focal)'" + msg: "ansible_distribution_release should be 'Debian 8 (Jessie)' or 'Debian 9 (Stretch)' or 'Debian 10 (Buster)' or 'Debian 11 (Bullseye)' or 'Ubuntu 16.04 (Xenial)' or 'Ubuntu 18.04 (Bionic)' or 'Ubuntu 20.04 (Focal)' or 'Ubuntu 22.04 (Jammy)'" when: - - ansible_distribution_release is not regex("xenial|stretch|buster|bullseye|bionic|focal") + - ansible_distribution_release is not regex("xenial|stretch|buster|bullseye|bionic|focal|jammy") tags: [mongodb, mongos, mongodb-install, mongos-install] - name: Disable Transparent Huge Pages on Systemd Systems