Skip to content

Commit 7a05c1e

Browse files
authored
Merge pull request #81 from csanquer/mongo_3.4
add mongo 3.4 support
2 parents cec74ee + 0ca0675 commit 7a05c1e

File tree

5 files changed

+21
-16
lines changed

5 files changed

+21
-16
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Ansible role which manage [MongoDB](http://www.mongodb.org/).
1010

1111
MongoDB support matrix:
1212

13-
| Distribution | MongoDB 2.4 | MongoDB 2.6 | MongoDB 3.0 | MongoDB 3.2 |
14-
| ------------ |:-----------:|:-----------:|:-----------:|:-----------:|
15-
| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:|
16-
| Ubuntu 12.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:|
17-
| Ubuntu 16.04 | :no_entry: | :x: | :x: | :x:|
18-
| Debian 7.x | :no_entry: | :interrobang: | :interrobang: | :interrobang:|
19-
| Debian 8.x | :no_entry: | :x: | :x: | :x:|
13+
| Distribution | MongoDB 2.4 | MongoDB 2.6 | MongoDB 3.0 | MongoDB 3.2 | MongoDB 3.4 |
14+
| ------------ |:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
15+
| Ubuntu 14.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :x:|
16+
| Ubuntu 12.04 | :no_entry: | :white_check_mark: | :white_check_mark: | :white_check_mark:| :x:|
17+
| Ubuntu 16.04 | :no_entry: | :x: | :x: | :x:| :x:|
18+
| Debian 7.x | :no_entry: | :interrobang: | :interrobang: | :interrobang:| :x:|
19+
| Debian 8.x | :no_entry: | :x: | :x: | :x:| :x:|
2020

2121
:white_check_mark: - fully tested, should work fine
2222
:interrobang: - will be added testing suite soon
@@ -32,9 +32,9 @@ MongoDB support matrix:
3232
mongodb_package: mongodb-org
3333

3434
# You can control installed version via this param.
35-
# Should be '2.6', '3.0' or '3.2'. This role does't support MongoDB < 2.4.
35+
# Should be '2.6', '3.0', '3.2' or '3.4'. This role does't support MongoDB < 2.4.
3636
# I will recommend you to use latest version of MongoDB.
37-
mongodb_version: "3.2"
37+
mongodb_version: "3.4"
3838

3939
mongodb_force_wait_for_port: false # When not forced, the role will wait for mongod port to become available only with systemd
4040
mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager

defaults/main.yml

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

33
mongodb_package: mongodb-org
4-
mongodb_version: "3.2"
4+
mongodb_version: "3.4"
55
mongodb_apt_keyserver: keyserver.ubuntu.com
6-
mongodb_apt_key_id: "{{ 'EA312927' if mongodb_version[0:3] == '3.2' else '7F0CEB10' }}"
6+
mongodb_apt_key_id:
7+
"2.6": "7F0CEB10"
8+
"3.0": "7F0CEB10"
9+
"3.2": "EA312927"
10+
"3.4": "0C49F3730359A14518585931BC711F9BA15703C6"
11+
712
mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manager
813

914
mongodb_force_wait_for_port: false

tasks/install.deb.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
- name: Add APT key
2929
apt_key:
30-
keyserver: "{{mongodb_apt_keyserver}}"
31-
id: "{{mongodb_apt_key_id}}"
30+
keyserver: "{{ mongodb_apt_keyserver }}"
31+
id: "{{ mongodb_apt_key_id[mongodb_major_version] }}"
3232
when: mongodb_package == 'mongodb-org'
3333

3434
- name: Fail when used wrong mongodb_version variable

vars/Debian.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
32
mongodb_repository:
43
"2.6": "deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen"
54
"3.0": "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main"
6-
"3.2": "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.2 main"
5+
"3.2": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.2 main"
6+
"3.4": "deb http://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/3.4 main"

vars/Ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
32
mongodb_repository:
43
"2.6": "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen"
54
"3.0": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.0 multiverse"
65
"3.2": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.2 multiverse"
6+
"3.4": "deb http://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/3.4 multiverse"

0 commit comments

Comments
 (0)