diff --git a/defaults/main.yml b/defaults/main.yml index d73a8ade..b8663079 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,11 +10,13 @@ mongodb_apt_key_id: "4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4" "4.2": "E162F504A20CDF15827F718D4B7C549A058F8B6B" "4.4": "20691eec35216c63caf66ce1656408e390cfb1f5" + "6.0": "39bd841e4be5fb195a65400e6a26b1ae64c3c388" mongodb_apt_key_url: "3.6": "https://www.mongodb.org/static/pgp/server-3.6.asc" "4.0": "https://www.mongodb.org/static/pgp/server-4.0.asc" "4.2": "https://www.mongodb.org/static/pgp/server-4.2.asc" "4.4": "https://www.mongodb.org/static/pgp/server-4.4.asc" + "6.0": "https://www.mongodb.org/static/pgp/server-6.0.asc" mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager mongodb_pymongo_pip_version: 3.11.3 diff --git a/tasks/install.debian.yml b/tasks/install.debian.yml index 6f578774..ee8f7ccd 100644 --- a/tasks/install.debian.yml +++ b/tasks/install.debian.yml @@ -18,7 +18,7 @@ - name: Fail when used wrong mongodb_version variable fail: - msg: "mongodb_version variable should be '3.6' or '4.0', '4.2' or '4.4'" + msg: "mongodb_version variable should be '3.6' or '4.0', '4.2' or '4.4' or '6.0'" when: (mongodb_package == 'mongodb-org' and (mongodb_version is not defined or mongodb_repository[mongodb_major_version] is not defined)) diff --git a/templates/mongod.conf.j2 b/templates/mongod.conf.j2 index c896d759..392c2693 100644 --- a/templates/mongod.conf.j2 +++ b/templates/mongod.conf.j2 @@ -106,7 +106,7 @@ operationProfiling: {% endfor %} {% endif %} -{% if mongodb_major_version is version("4.0", ">=") -%} +{% if mongodb_major_version is version("4.0", ">=") and mongodb_major_version is version("4.13", "<") -%} cloud: monitoring: free: diff --git a/vars/Ubuntu.yml b/vars/Ubuntu.yml index 5fd8dd19..89e101a0 100644 --- a/vars/Ubuntu.yml +++ b/vars/Ubuntu.yml @@ -1,9 +1,11 @@ --- +mongodb_distribution_release: "{{ 'jammy' if ansible_distribution_release == 'lunar' else ansible_distribution_release }}" mongodb_repository: "3.6": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.6 multiverse" "4.0": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.0 multiverse" "4.2": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.2 multiverse" "4.4": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse" + "6.0": "deb http://repo.mongodb.org/apt/ubuntu {{ mongodb_distribution_release }}/mongodb-org/6.0 multiverse" mongodb_pymongo_package: "{{ 'python3-pymongo' if ansible_facts['python'].version.major == 3 else 'python-pymongo' }}" mongodb_pymongo_deps: