Skip to content

Commit daac15c

Browse files
authored
Merge pull request #160 from psabhay/master
Mongodb package name fix for ubuntu 18.04
2 parents c38ca80 + 00e8a6e commit daac15c

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
DISTRIBUTION=ubuntu
1212
DIST_VERSION=18_04-builded
1313
MONGODB_VERSION=4.0
14-
MONGODB_PACKAGE=mongodb
14+
MONGODB_PACKAGE=mongodb-org
1515
- >
1616
DISTRIBUTION=ubuntu
1717
DIST_VERSION=18_04-builded
@@ -49,7 +49,7 @@ env:
4949
DISTRIBUTION=debian
5050
DIST_VERSION=9-builded
5151
MONGODB_VERSION=3.6
52-
MONGODB_PACKAGE=mongodb
52+
MONGODB_PACKAGE=mongodb-org
5353
- >
5454
DISTRIBUTION=debian
5555
DIST_VERSION=8-builded

tasks/install.debian.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@
2929
when: (mongodb_package == 'mongodb-org' and
3030
(mongodb_version is not defined
3131
or mongodb_repository[mongodb_major_version] is not defined
32-
or (mongodb_version != '3.6' and mongodb_version != '4.0'))
32+
or (mongodb_version != '3.6' and mongodb_version != '4.0'))
3333
and (ansible_distribution_release == 'stretch' and ansible_distribution_release == 'jessie'))
3434

3535
- name: Fail when used wrong mongodb_version variable with Ubuntu 18.04
3636
fail:
37-
msg: "mongodb_version variable should be '3.6' or '4.0' and mongodb_package should be 'mongodb' for Ubuntu 18.04"
38-
when: ((mongodb_package == 'mongodb-org' or (mongodb_version != '3.6' and mongodb_version != '4.0'))
39-
and ansible_distribution_release == "bionic")
37+
msg: "mongodb_version variable should be '4.0' or else mongodb_package should be 'mongodb' for Ubuntu 18.04"
38+
when:
39+
- mongodb_package == 'mongodb-org'
40+
- mongodb_version != '4.0'
41+
- ansible_distribution_release == "bionic"
4042

4143
- name: Fail when used wrong mongodb_version variable
4244
fail:

tests/group_vars/all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22

3-
image_name: "ubuntu-upstart:14.04"
3+
image_name: "ubuntu-upstart:18.04"
44
mongodb_package: mongodb-org
5-
mongodb_version: "3.6"
5+
mongodb_version: "4.0"
66
mongodb_storage_dbpath: /var/lib/mongodb
77
mongodb_net_bindip: 0.0.0.0
88
mongodb_login_host: "{{ hostvars[groups['mongo_master'][0]].ansible_default_ipv4.address }}"

0 commit comments

Comments
 (0)