Mongodb 4.2 support added

This commit is contained in:
Abhay PS 2019-09-10 12:24:56 +02:00
parent 196c796ef9
commit 6556ffa9c9
7 changed files with 46 additions and 6 deletions

View File

@ -6,6 +6,11 @@ language: python
python: python:
- "2.7" - "2.7"
env: env:
- >
DISTRIBUTION=ubuntu
DIST_VERSION=18_04-builded
MONGODB_VERSION=4.2
MONGODB_PACKAGE=mongodb-org
- > - >
DISTRIBUTION=ubuntu DISTRIBUTION=ubuntu
DIST_VERSION=18_04-builded DIST_VERSION=18_04-builded
@ -16,6 +21,10 @@ env:
DIST_VERSION=18_04-builded DIST_VERSION=18_04-builded
MONGODB_VERSION=3.6 MONGODB_VERSION=3.6
MONGODB_PACKAGE=mongodb MONGODB_PACKAGE=mongodb
- >
DISTRIBUTION=ubuntu
DIST_VERSION=16_04-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=ubuntu DISTRIBUTION=ubuntu
DIST_VERSION=16_04-builded DIST_VERSION=16_04-builded
@ -28,6 +37,10 @@ env:
DISTRIBUTION=ubuntu DISTRIBUTION=ubuntu
DIST_VERSION=16_04-builded DIST_VERSION=16_04-builded
MONGODB_VERSION=3.4 MONGODB_VERSION=3.4
- >
DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=ubuntu-upstart DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04 DIST_VERSION=14.04
@ -40,6 +53,10 @@ env:
DISTRIBUTION=ubuntu-upstart DISTRIBUTION=ubuntu-upstart
DIST_VERSION=14.04 DIST_VERSION=14.04
MONGODB_VERSION=3.4 MONGODB_VERSION=3.4
- >
DISTRIBUTION=debian
DIST_VERSION=9-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=9-builded DIST_VERSION=9-builded
@ -48,6 +65,10 @@ env:
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=9-builded DIST_VERSION=9-builded
MONGODB_VERSION=3.6 MONGODB_VERSION=3.6
- >
DISTRIBUTION=debian
DIST_VERSION=8-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=8-builded DIST_VERSION=8-builded
@ -60,6 +81,10 @@ env:
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=8-builded DIST_VERSION=8-builded
MONGODB_VERSION=3.4 MONGODB_VERSION=3.4
- >
DISTRIBUTION=centos
DIST_VERSION=6-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=centos DISTRIBUTION=centos
DIST_VERSION=6-builded DIST_VERSION=6-builded
@ -72,6 +97,10 @@ env:
DISTRIBUTION=centos DISTRIBUTION=centos
DIST_VERSION=6-builded DIST_VERSION=6-builded
MONGODB_VERSION=3.4 MONGODB_VERSION=3.4
- >
DISTRIBUTION=centos
DIST_VERSION=7-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=centos DISTRIBUTION=centos
DIST_VERSION=7-builded DIST_VERSION=7-builded
@ -84,6 +113,10 @@ env:
DISTRIBUTION=centos DISTRIBUTION=centos
DIST_VERSION=7-builded DIST_VERSION=7-builded
MONGODB_VERSION=3.4 MONGODB_VERSION=3.4
- >
DISTRIBUTION=amazonlinux
DIST_VERSION=2-builded
MONGODB_VERSION=4.2
- > - >
DISTRIBUTION=amazonlinux DISTRIBUTION=amazonlinux
DIST_VERSION=2-builded DIST_VERSION=2-builded

View File

@ -2,12 +2,13 @@
mongodb_package: mongodb-org mongodb_package: mongodb-org
mongodb_package_state: present mongodb_package_state: present
mongodb_version: "4.0" mongodb_version: "4.2"
mongodb_apt_keyserver: keyserver.ubuntu.com mongodb_apt_keyserver: keyserver.ubuntu.com
mongodb_apt_key_id: mongodb_apt_key_id:
"3.4": "0C49F3730359A14518585931BC711F9BA15703C6" "3.4": "0C49F3730359A14518585931BC711F9BA15703C6"
"3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5" "3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5"
"4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4" "4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4"
"4.2": "E162F504A20CDF15827F718D4B7C549A058F8B6B"
mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager
mongodb_pymongo_pip_version: 3.7.1 mongodb_pymongo_pip_version: 3.7.1

View File

@ -17,23 +17,23 @@
- name: Fail when used wrong mongodb_version variable with Debian Stretch - name: Fail when used wrong mongodb_version variable with Debian Stretch
fail: fail:
msg: "mongodb_version variable should be '3.6' or '4.0' for Debian Stretch" msg: "mongodb_version variable should be '3.6' or '4.0' or '4.2' for Debian Stretch"
when: when:
- mongodb_package == 'mongodb-org' - mongodb_package == 'mongodb-org'
- (mongodb_major_version != '3.6' and mongodb_major_version != '4.0') - (mongodb_major_version != '3.6' and mongodb_major_version != '4.0' and mongodb_major_version != '4.2')
- ansible_distribution_release == 'stretch' - ansible_distribution_release == 'stretch'
- name: Fail when used wrong mongodb_version variable with Ubuntu 18.04 - name: Fail when used wrong mongodb_version variable with Ubuntu 18.04
fail: fail:
msg: "mongodb_version variable should be '4.0' or else mongodb_package should be 'mongodb' for Ubuntu 18.04" msg: "mongodb_version variable should be '4.0' or '4.2', or else mongodb_package should be 'mongodb' for Ubuntu 18.04"
when: when:
- mongodb_package == 'mongodb-org' - mongodb_package == 'mongodb-org'
- mongodb_major_version != '4.0' - (mongodb_major_version != '4.0' and mongodb_major_version != '4.2')
- ansible_distribution_release == "bionic" - ansible_distribution_release == "bionic"
- name: Fail when used wrong mongodb_version variable - name: Fail when used wrong mongodb_version variable
fail: fail:
msg: "mongodb_version variable should be '3.4', '3.6' or '4.0'" msg: "mongodb_version variable should be '3.4', '3.6' or '4.0' or '4.2'"
when: (mongodb_package == 'mongodb-org' and when: (mongodb_package == 'mongodb-org' and
(mongodb_version is not defined (mongodb_version is not defined
or mongodb_repository[mongodb_major_version] is not defined)) or mongodb_repository[mongodb_major_version] is not defined))

View File

@ -1,10 +1,12 @@
--- ---
mongodb_repository: mongodb_repository:
"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/" "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/" "3.6": "https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.6/x86_64/"
"3.4": "https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/" "3.4": "https://repo.mongodb.org/yum/amazon/2013.03/mongodb-org/3.4/x86_64/"
mongodb_repository_gpgkey: mongodb_repository_gpgkey:
"4.2": "https://www.mongodb.org/static/pgp/server-4.2.asc"
"4.0": "https://www.mongodb.org/static/pgp/server-4.0.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" "3.6": "https://www.mongodb.org/static/pgp/server-3.6.asc"

View File

@ -3,3 +3,4 @@ mongodb_repository:
"3.4": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.4 main" "3.4": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.4 main"
"3.6": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.6 main" "3.6": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.6 main"
"4.0": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.0 main" "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"

View File

@ -4,10 +4,12 @@ mongodb_repository:
"3.4": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/$basearch/" "3.4": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/$basearch/"
"3.6": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/$basearch/" "3.6": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.6/$basearch/"
"4.0": "https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.0/$basearch/" "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/"
mongodb_repository_gpgkey: mongodb_repository_gpgkey:
"3.4": "https://www.mongodb.org/static/pgp/server-3.4.asc" "3.4": "https://www.mongodb.org/static/pgp/server-3.4.asc"
"3.6": "https://www.mongodb.org/static/pgp/server-3.6.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.0": "https://www.mongodb.org/static/pgp/server-4.0.asc"
"4.2": "https://www.mongodb.org/static/pgp/server-4.2.asc"
mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}" mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}"

View File

@ -3,3 +3,4 @@ mongodb_repository:
"3.4": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.4 multiverse" "3.4": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.4 multiverse"
"3.6": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.6 multiverse" "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.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"