File tree Expand file tree Collapse file tree 4 files changed +18
-23
lines changed Expand file tree Collapse file tree 4 files changed +18
-23
lines changed Original file line number Diff line number Diff line change 31
31
DISTRIBUTION=ubuntu-upstart
32
32
DIST_VERSION=14.04
33
33
MONGODB_VERSION=3.2
34
- - >
35
- DISTRIBUTION=debian
36
- DIST_VERSION=9-builded
37
- MONGODB_VERSION=3.6
38
- - >
39
- DISTRIBUTION=debian
40
- DIST_VERSION=9-builded
41
- MONGODB_VERSION=3.4
42
34
- >
43
35
DISTRIBUTION=debian
44
36
DIST_VERSION=9-builded
Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ def load_mongocnf():
301
301
302
302
return creds
303
303
304
- def wait_for_ok_and_master (module , client , timeout = 120 ):
304
+ def wait_for_ok_and_master (module , client , timeout = 60 ):
305
305
while True :
306
306
status = client .admin .command ('replSetGetStatus' , check = False )
307
307
if status ['ok' ] == 1 and status ['myState' ] == 1 :
@@ -400,7 +400,7 @@ def main():
400
400
"username" : login_user ,
401
401
"password" : login_password ,
402
402
"authsource" : login_database ,
403
- "serverselectiontimeoutms" : 110000 ,
403
+ "serverselectiontimeoutms" : 30000 ,
404
404
}
405
405
406
406
if ssl :
Original file line number Diff line number Diff line change 11
11
mongodb_is_systemd : " {{ sbin_init.stat.islnk is defined and sbin_init.stat.islnk }}"
12
12
mongodb_major_version : " {{ mongodb_version[0:3] }}"
13
13
14
- - name : Add systemd configuration if present
15
- copy : src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640
16
- when : mongodb_is_systemd
17
-
18
- - name : Add symlink for systemd
19
- file : src=/lib/systemd/system/mongodb.service dest=/etc/systemd/system/multi-user.target.wants/mongodb.service state=link
20
- when : mongodb_is_systemd
21
- notify : reload systemd
22
-
23
- - meta : flush_handlers
24
- when : mongodb_is_systemd
14
+ - name : Overwrite mongodb_version especially for Debian 9
15
+ set_fact :
16
+ mongodb_major_version : " 3.2"
25
17
26
18
- name : Add APT key
27
19
apt_key :
47
39
- " {{mongodb_package}}"
48
40
- numactl
49
41
42
+ - name : Add systemd configuration if present
43
+ copy : src=mongodb.service dest=/lib/systemd/system/mongodb.service owner=root group=root mode=0640
44
+ when : mongodb_is_systemd
45
+
46
+ - name : Add symlink for systemd
47
+ file : src=/lib/systemd/system/mongodb.service dest=/etc/systemd/system/multi-user.target.wants/mongodb.service state=link
48
+ when : mongodb_is_systemd
49
+ notify : reload systemd
50
+
50
51
- name : reload systemd
51
52
shell : systemctl daemon-reload
52
- changed_when : false
53
+ when : mongodb_is_systemd and mongodb_manage_service
54
+
55
+ - meta : flush_handlers
53
56
when : mongodb_is_systemd
54
57
55
58
- name : Install PyMongo package
Original file line number Diff line number Diff line change 1
1
---
2
2
3
3
image_name : " ubuntu-upstart:14.04"
4
- mongodb_version : " 3.0 "
4
+ mongodb_version : " 3.6 "
5
5
mongodb_storage_dbpath : /var/lib/mongodb
6
6
mongodb_net_bindip : 0.0.0.0
7
7
mongodb_login_host : " {{ hostvars[groups['mongo_master'][0]].ansible_default_ipv4.address }}"
You can’t perform that action at this time.
0 commit comments