From 6556ffa9c90c40eb4648630246944a9dae2ac824 Mon Sep 17 00:00:00 2001 From: Abhay PS Date: Tue, 10 Sep 2019 12:24:56 +0200 Subject: [PATCH 1/4] Mongodb 4.2 support added --- .travis.yml | 33 +++++++++++++++++++++++++++++++++ defaults/main.yml | 3 ++- tasks/install.debian.yml | 10 +++++----- vars/Amazon.yml | 2 ++ vars/Debian.yml | 1 + vars/RedHat.yml | 2 ++ vars/Ubuntu.yml | 1 + 7 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2e3d8b..ea5d8fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,11 @@ language: python python: - "2.7" env: + - > + DISTRIBUTION=ubuntu + DIST_VERSION=18_04-builded + MONGODB_VERSION=4.2 + MONGODB_PACKAGE=mongodb-org - > DISTRIBUTION=ubuntu DIST_VERSION=18_04-builded @@ -16,6 +21,10 @@ env: DIST_VERSION=18_04-builded MONGODB_VERSION=3.6 MONGODB_PACKAGE=mongodb + - > + DISTRIBUTION=ubuntu + DIST_VERSION=16_04-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=ubuntu DIST_VERSION=16_04-builded @@ -28,6 +37,10 @@ env: DISTRIBUTION=ubuntu DIST_VERSION=16_04-builded MONGODB_VERSION=3.4 + - > + DISTRIBUTION=ubuntu-upstart + DIST_VERSION=14.04 + MONGODB_VERSION=4.2 - > DISTRIBUTION=ubuntu-upstart DIST_VERSION=14.04 @@ -40,6 +53,10 @@ env: DISTRIBUTION=ubuntu-upstart DIST_VERSION=14.04 MONGODB_VERSION=3.4 + - > + DISTRIBUTION=debian + DIST_VERSION=9-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=debian DIST_VERSION=9-builded @@ -48,6 +65,10 @@ env: DISTRIBUTION=debian DIST_VERSION=9-builded MONGODB_VERSION=3.6 + - > + DISTRIBUTION=debian + DIST_VERSION=8-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=debian DIST_VERSION=8-builded @@ -60,6 +81,10 @@ env: DISTRIBUTION=debian DIST_VERSION=8-builded MONGODB_VERSION=3.4 + - > + DISTRIBUTION=centos + DIST_VERSION=6-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=centos DIST_VERSION=6-builded @@ -72,6 +97,10 @@ env: DISTRIBUTION=centos DIST_VERSION=6-builded MONGODB_VERSION=3.4 + - > + DISTRIBUTION=centos + DIST_VERSION=7-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=centos DIST_VERSION=7-builded @@ -84,6 +113,10 @@ env: DISTRIBUTION=centos DIST_VERSION=7-builded MONGODB_VERSION=3.4 + - > + DISTRIBUTION=amazonlinux + DIST_VERSION=2-builded + MONGODB_VERSION=4.2 - > DISTRIBUTION=amazonlinux DIST_VERSION=2-builded diff --git a/defaults/main.yml b/defaults/main.yml index 79204e7..37e611f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -2,12 +2,13 @@ mongodb_package: mongodb-org mongodb_package_state: present -mongodb_version: "4.0" +mongodb_version: "4.2" mongodb_apt_keyserver: keyserver.ubuntu.com mongodb_apt_key_id: "3.4": "0C49F3730359A14518585931BC711F9BA15703C6" "3.6": "2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5" "4.0": "9DA31620334BD75D9DCB49F368818C72E52529D4" + "4.2": "E162F504A20CDF15827F718D4B7C549A058F8B6B" mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager mongodb_pymongo_pip_version: 3.7.1 diff --git a/tasks/install.debian.yml b/tasks/install.debian.yml index 737406f..cefa0d0 100644 --- a/tasks/install.debian.yml +++ b/tasks/install.debian.yml @@ -17,23 +17,23 @@ - name: Fail when used wrong mongodb_version variable with Debian Stretch 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: - 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' - name: Fail when used wrong mongodb_version variable with Ubuntu 18.04 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: - mongodb_package == 'mongodb-org' - - mongodb_major_version != '4.0' + - (mongodb_major_version != '4.0' and mongodb_major_version != '4.2') - ansible_distribution_release == "bionic" - name: Fail when used wrong mongodb_version variable 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 (mongodb_version is not defined or mongodb_repository[mongodb_major_version] is not defined)) diff --git a/vars/Amazon.yml b/vars/Amazon.yml index 543515b..ef029bd 100644 --- a/vars/Amazon.yml +++ b/vars/Amazon.yml @@ -1,10 +1,12 @@ --- 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/" "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/" 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" "3.6": "https://www.mongodb.org/static/pgp/server-3.6.asc" diff --git a/vars/Debian.yml b/vars/Debian.yml index f177ee5..c4a956d 100644 --- a/vars/Debian.yml +++ b/vars/Debian.yml @@ -3,3 +3,4 @@ mongodb_repository: "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" "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" diff --git a/vars/RedHat.yml b/vars/RedHat.yml index 0b01502..c810d34 100644 --- a/vars/RedHat.yml +++ b/vars/RedHat.yml @@ -4,10 +4,12 @@ mongodb_repository: "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/" "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: "3.4": "https://www.mongodb.org/static/pgp/server-3.4.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" mongodb_pidfile_path: "{{ '/var/run/mongodb/mongod.pid' if ('mongodb-org' in mongodb_package) else '' }}" diff --git a/vars/Ubuntu.yml b/vars/Ubuntu.yml index 084776c..1054614 100644 --- a/vars/Ubuntu.yml +++ b/vars/Ubuntu.yml @@ -3,3 +3,4 @@ mongodb_repository: "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" "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" From 63af4a6f21ddbe3746dd65bf1db3bbc8bbd5d9b2 Mon Sep 17 00:00:00 2001 From: Abhay PS Date: Tue, 10 Sep 2019 14:54:36 +0200 Subject: [PATCH 2/4] remove unsupported os versions from test. --- .travis.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index ea5d8fb..a7f1365 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,10 +37,6 @@ env: DISTRIBUTION=ubuntu DIST_VERSION=16_04-builded MONGODB_VERSION=3.4 - - > - DISTRIBUTION=ubuntu-upstart - DIST_VERSION=14.04 - MONGODB_VERSION=4.2 - > DISTRIBUTION=ubuntu-upstart DIST_VERSION=14.04 @@ -65,10 +61,6 @@ env: DISTRIBUTION=debian DIST_VERSION=9-builded MONGODB_VERSION=3.6 - - > - DISTRIBUTION=debian - DIST_VERSION=8-builded - MONGODB_VERSION=4.2 - > DISTRIBUTION=debian DIST_VERSION=8-builded From 75e2616f239982661e68ee472ff3cb8ababade20 Mon Sep 17 00:00:00 2001 From: Abhay PS Date: Wed, 11 Sep 2019 11:50:45 +0200 Subject: [PATCH 3/4] Readme file update with 4.2 support details. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6a47e89..0dc4adf 100644 --- a/README.md +++ b/README.md @@ -10,16 +10,16 @@ Ansible role which manages [MongoDB](http://www.mongodb.org/). MongoDB support matrix: -| Distribution | < MongoDB 3.2 | MongoDB 3.4 | MongoDB 3.6 | MongoDB 4.0 | -| -------------- | :-----------: | :----------------: | :----------------: | :----------------: | -| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Ubuntu 18.04 | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | -| Debian 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Debian 9.x | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | -| RHEL 6.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| RHEL 7.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Amazon Linux 2 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Distribution | < MongoDB 3.2 | MongoDB 3.4 | MongoDB 3.6 | MongoDB 4.0 | MongoDB 4.2 | +| -------------- | :-----------: | :----------------: | :----------------: | :----------------: | :----------------: | +| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | +| Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Ubuntu 18.04 | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Debian 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | +| Debian 9.x | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| RHEL 6.x | :no_entry: | :white_check_mark: | :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: | +| Amazon Linux 2 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | - :white_check_mark: - fully tested, should works fine - :interrobang: - maybe works, not tested From b15ffeef4d771591065d02a1fb7f6e12d88f9228 Mon Sep 17 00:00:00 2001 From: Abhay PS Date: Wed, 11 Sep 2019 12:06:03 +0200 Subject: [PATCH 4/4] Fix README file. Used wrong icon for non-support OS version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0dc4adf..f2efb09 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ MongoDB support matrix: | Distribution | < MongoDB 3.2 | MongoDB 3.4 | MongoDB 3.6 | MongoDB 4.0 | MongoDB 4.2 | | -------------- | :-----------: | :----------------: | :----------------: | :----------------: | :----------------: | -| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | +| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | Ubuntu 16.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Ubuntu 18.04 | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| Debian 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :no_entry: | +| Debian 8.x | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :x: | | Debian 9.x | :no_entry: | :x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | | RHEL 6.x | :no_entry: | :white_check_mark: | :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: |