File tree Expand file tree Collapse file tree 4 files changed +18
-8
lines changed Expand file tree Collapse file tree 4 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ mongodb_pymongo_from_pip: true # Install latest PyMongo via PIP or package manag
43
43
mongodb_pymongo_pip_version : 3.6.1 # Choose PyMong version to install from pip. If not set use latest
44
44
mongodb_user_update_password : " on_create" # MongoDB user password update default policy
45
45
mongodb_manage_service : true
46
+ mongodb_manage_systemd_unit : true
46
47
47
48
# Disable transparent hugepages on systemd debian based installations
48
49
mongodb_disable_transparent_hugepages : false
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ mongodb_pymongo_pip_version: 3.7.1
15
15
16
16
mongodb_user_update_password : " on_create" # MongoDB user password update default policy
17
17
mongodb_manage_service : true
18
+ mongodb_manage_systemd_unit : true
18
19
19
20
mongodb_disable_transparent_hugepages : false
20
21
Original file line number Diff line number Diff line change 3
3
- name : reload systemd
4
4
systemd :
5
5
daemon_reload : yes
6
- when : ansible_service_mgr == "systemd" and mongodb_manage_service
6
+ when : ansible_service_mgr == "systemd" and mongodb_manage_service | bool
7
7
8
8
- name : mongodb reload
9
9
service :
10
10
name : " {{ mongodb_daemon_name }}"
11
11
state : reloaded
12
- when : mongodb_manage_service| bool
12
+ when : mongodb_manage_service | bool
13
13
14
14
- name : mongodb restart
15
15
service :
16
16
name : " {{ mongodb_daemon_name }}"
17
17
state : restarted
18
- when : mongodb_manage_service| bool
18
+ when : mongodb_manage_service | bool
19
19
20
20
- name : mongodb-mms-monitoring-agent restart
21
21
service :
22
22
name : mongodb-mms-monitoring-agent
23
23
state : restarted
24
- when : mongodb_manage_service| bool
24
+ when : mongodb_manage_service | bool
25
25
26
26
- name : restart sysfsutils
27
27
service :
Original file line number Diff line number Diff line change 59
59
state : present
60
60
61
61
- name : Add systemd configuration if present
62
- copy : src=mongodb.service dest=/lib/systemd/system/{{mongodb_daemon_name}}.service owner=root group=root mode=0644
63
- when : ansible_service_mgr == "systemd"
62
+ copy :
63
+ src : mongodb.service
64
+ dest : " /lib/systemd/system/{{mongodb_daemon_name}}.service"
65
+ owner : root
66
+ group : root
67
+ mode : ' 0644'
68
+ when : ansible_service_mgr == "systemd" and mongodb_manage_systemd_unit | bool
64
69
notify :
65
70
- reload systemd
66
71
67
72
- name : Add symlink for systemd
68
- file : src=/lib/systemd/system/{{mongodb_daemon_name}}.service dest=/etc/systemd/system/multi-user.target.wants/{{mongodb_daemon_name}}.service state=link
69
- when : ansible_service_mgr == "systemd"
73
+ file :
74
+ src : " /lib/systemd/system/{{mongodb_daemon_name}}.service"
75
+ dest : " /etc/systemd/system/multi-user.target.wants/{{mongodb_daemon_name}}.service"
76
+ state : link
77
+ when : ansible_service_mgr == "systemd" and mongodb_manage_systemd_unit | bool
70
78
notify :
71
79
- reload systemd
72
80
You can’t perform that action at this time.
0 commit comments