Skip to content
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
1 change: 1 addition & 0 deletions .github/workflows/amazonlinux2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
molecule_distro:
- amazonlinux2
mongodb_version:
- '5.0'
- '4.4'
- '4.2'
- '4.0'
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/centos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
molecule_distro:
molecule_distro:
- centos7
- centos8
mongodb_version:
- '5.0'
- '4.4'
- '4.2'
- '4.0'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- debian9
- debian10
mongodb_version:
- '5.0'
- '4.4'
- '4.2'
- '4.0'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
include:
- molecule_distro: ubuntu2004
mongodb_version: '4.4'
- molecule_distro: ubuntu2004
mongodb_version: '5.0'
env:
MONGODB_VERSION: ${{ matrix.mongodb_version }}
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Ansible role to install and manage [MongoDB](http://www.mongodb.org/).

MongoDB support matrix:

| Distribution | < MongoDB 3.4 | MongoDB 3.6 | MongoDB 4.0 | MongoDB 4.2 | MongoDB 4.4 |
| -------------- | :-----------: | :----------------: | :----------------: | :----------------: | :----------------: |
| Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| Ubuntu 18.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: |
| Ubuntu 20.04 | :no_entry: | :x: | :x: | :x: | :white_check_mark: |
| Debian 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 10.x | :no_entry: | :x: | :x: | :white_check_mark: | :white_check_mark: |
| RHEL 7.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| RHEL 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Amazon Linux 2 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Distribution | < MongoDB 3.4 | MongoDB 3.6 | MongoDB 4.0 | MongoDB 4.2 | MongoDB 4.4 | MongoDB 5.0 |
| -------------- | :-----------: | :----------------: | :----------------: | :----------------: | :----------------: | :----------------: |
| Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Ubuntu 18.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | :x: |
| Ubuntu 20.04 | :no_entry: | :x: | :x: | :x: | :white_check_mark: | :white_check_mark: |
| Debian 9.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Debian 10.x | :no_entry: | :x: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| RHEL 7.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| RHEL 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Amazon Linux 2 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |

- :white_check_mark: - fully tested
- :x: - don't have official support
Expand All @@ -38,7 +38,7 @@ mongodb_package: mongodb-org
# `mongodb_version` variable sets version of MongoDB.
# Should be '3.6', '4.0', '4.2' or '4.4'. This role doesn't support MongoDB < 3.6.
# I would recommend you to use the latest version of MongoDB.
mongodb_version: "4.4"
mongodb_version: "5.0"

mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager
mongodb_pymongo_pip_version: 3.6.1 # Choose PyMong version to install from pip. If not set use latest
Expand Down
5 changes: 4 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

mongodb_package: mongodb-org
mongodb_package_state: present
mongodb_version: "4.4"
mongodb_version: "5.0"
mongodb_apt_key_from_url: false
mongodb_apt_keyserver: 'hkp://keyserver.ubuntu.com:80'
mongodb_apt_key_id:
"3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5"
"4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4"
"4.2": "E162F504A20CDF15827F718D4B7C549A058F8B6B"
"4.4": "20691eec35216c63caf66ce1656408e390cfb1f5"
"5.0": "F5679A222C647C87527C2F8CB00A0BD1E2C63C11"

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"
"5.0": "https://www.mongodb.org/static/pgp/server-5.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 molecule/cluster/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-../default/converge.yml}
prepare: ${MOLECULE_PLAYBOOK:-../default/prepare.yml}
env:
MONGODB_VERSION: ${MONGODB_VERSION:-4.4}
MONGODB_VERSION: ${MONGODB_VERSION:-5.0}
MONGODB_PACKAGE: ${MONGODB_PACKAGE:-mongodb-org}
AUTH_STATE: ${AUTH_STATE:-disabled}
REPLICASET: ${REPLICASET:-testrs}
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ provisioner:
converge: ${MOLECULE_PLAYBOOK:-converge.yml}
prepare: ${MOLECULE_PLAYBOOK:-prepare.yml}
env:
MONGODB_VERSION: ${MONGODB_VERSION:-4.4}
MONGODB_VERSION: ${MONGODB_VERSION:-5.0}
MONGODB_PACKAGE: ${MONGODB_PACKAGE:-mongodb-org}
AUTH_STATE: ${AUTH_STATE:-disabled}
inventory:
Expand Down
14 changes: 8 additions & 6 deletions vars/Amazon.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
mongodb_repository:
"4.4": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64/"
"4.2": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/"
"4.0": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.0/x86_64/"
"3.6": "https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/"
"4.0": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.0/x86_64/"
"4.2": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.2/x86_64/"
"4.4": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/4.4/x86_64/"
"5.0": "https://repo.mongodb.org/yum/amazon/2/mongodb-org/5.0/x86_64/"

mongodb_repository_gpgkey:
"4.4": "https://www.mongodb.org/static/pgp/server-4.4.asc"
"4.2": "https://www.mongodb.org/static/pgp/server-4.2.asc"
"4.0": "https://www.mongodb.org/static/pgp/server-4.0.asc"
"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"
"5.0": "https://www.mongodb.org/static/pgp/server-5.0.asc"

mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}"

Expand Down
1 change: 1 addition & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mongodb_repository:
"4.0": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.0 main"
"4.2": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.2 main"
"4.4": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.4 main"
"5.0": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/5.0 main"

mongodb_pymongo_package: "{{ 'python3-pymongo' if ansible_facts['python'].version.major == 3 else 'python-pymongo' }}"
mongodb_pymongo_deps:
Expand Down
2 changes: 2 additions & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ mongodb_repository:
"4.0": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/$basearch/"
"4.2": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.2/$basearch/"
"4.4": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/$basearch/"
"5.0": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/5.0/$basearch/"

mongodb_repository_gpgkey:
"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"
"5.0": "https://www.mongodb.org/static/pgp/server-5.0.asc"

mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}"

Expand Down
1 change: 1 addition & 0 deletions vars/Ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ mongodb_repository:
"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"
"5.0": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/5.0 multiverse"

mongodb_pymongo_package: "{{ 'python3-pymongo' if ansible_facts['python'].version.major == 3 else 'python-pymongo' }}"
mongodb_pymongo_deps:
Expand Down