Merge pull request #160 from psabhay/master

Mongodb package name fix for ubuntu 18.04
This commit is contained in:
Sergei Antipov 2019-05-21 14:14:35 -04:00 committed by GitHub
commit daac15cd1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 8 deletions

View File

@ -11,7 +11,7 @@ env:
DISTRIBUTION=ubuntu DISTRIBUTION=ubuntu
DIST_VERSION=18_04-builded DIST_VERSION=18_04-builded
MONGODB_VERSION=4.0 MONGODB_VERSION=4.0
MONGODB_PACKAGE=mongodb MONGODB_PACKAGE=mongodb-org
- > - >
DISTRIBUTION=ubuntu DISTRIBUTION=ubuntu
DIST_VERSION=18_04-builded DIST_VERSION=18_04-builded
@ -49,7 +49,7 @@ env:
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=9-builded DIST_VERSION=9-builded
MONGODB_VERSION=3.6 MONGODB_VERSION=3.6
MONGODB_PACKAGE=mongodb MONGODB_PACKAGE=mongodb-org
- > - >
DISTRIBUTION=debian DISTRIBUTION=debian
DIST_VERSION=8-builded DIST_VERSION=8-builded

View File

@ -29,14 +29,16 @@
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
or (mongodb_version != '3.6' and mongodb_version != '4.0')) or (mongodb_version != '3.6' and mongodb_version != '4.0'))
and (ansible_distribution_release == 'stretch' and ansible_distribution_release == 'jessie')) and (ansible_distribution_release == 'stretch' and ansible_distribution_release == 'jessie'))
- 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 '3.6' or '4.0' and mongodb_package should be 'mongodb' for Ubuntu 18.04" msg: "mongodb_version variable should be '4.0' or else mongodb_package should be 'mongodb' for Ubuntu 18.04"
when: ((mongodb_package == 'mongodb-org' or (mongodb_version != '3.6' and mongodb_version != '4.0')) when:
and ansible_distribution_release == "bionic") - mongodb_package == 'mongodb-org'
- mongodb_version != '4.0'
- ansible_distribution_release == "bionic"
- name: Fail when used wrong mongodb_version variable - name: Fail when used wrong mongodb_version variable
fail: fail:

View File

@ -1,8 +1,8 @@
--- ---
image_name: "ubuntu-upstart:14.04" image_name: "ubuntu-upstart:18.04"
mongodb_package: mongodb-org mongodb_package: mongodb-org
mongodb_version: "3.6" mongodb_version: "4.0"
mongodb_storage_dbpath: /var/lib/mongodb mongodb_storage_dbpath: /var/lib/mongodb
mongodb_net_bindip: 0.0.0.0 mongodb_net_bindip: 0.0.0.0
mongodb_login_host: "{{ hostvars[groups['mongo_master'][0]].ansible_default_ipv4.address }}" mongodb_login_host: "{{ hostvars[groups['mongo_master'][0]].ansible_default_ipv4.address }}"