Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mongo 6.0 support #272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tasks/install.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion templates/mongod.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions vars/Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down