File tree Expand file tree Collapse file tree 6 files changed +21
-10
lines changed Expand file tree Collapse file tree 6 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 37
37
- name : Reset ssh connection to allow user changes to affect ansible_user
38
38
meta : reset_connection
39
39
40
+ - hosts : systemd
41
+ become : yes
42
+ gather_facts : false
43
+ tags : systemd
44
+ tasks :
45
+ - name : Make systemd unit modifications
46
+ import_role :
47
+ name : systemd
48
+
40
49
- hosts : selinux
41
50
gather_facts : false
42
51
become : yes
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ Create drop-in files for systemd services.
16
16
- ` group ` : Required str. Inventory group this drop-in applies to.
17
17
- ` comment ` : Optional str. Comment describing reason for drop-in.
18
18
- ` content ` : Required str. Content of drop-in file.
19
+ - ` systemd_restart ` : Optional bool. Whether to reload unit definitions and restart services. Default ` false ` .
Original file line number Diff line number Diff line change
1
+ # systemd_dropins:
2
+ # <unit_name>:
3
+ # group: <required>
4
+ # comment: <optional>
5
+ # content: <required>
6
+
7
+ systemd_restart : false
Original file line number Diff line number Diff line change 25
25
- name : Reload unit definitions
26
26
ansible.builtin.shell :
27
27
cmd : systemctl daemon-reload
28
- when : _systemd_dropins.changed
28
+ when :
29
+ - _systemd_dropins.changed
30
+ - systemd_restart | default(false) | bool
29
31
30
32
- name : Reload units
31
33
ansible.builtin.systemd :
35
37
when :
36
38
- _systemd_dropins.changed
37
39
- " item.value.group in group_names"
40
+ - systemd_restart | default(false) | bool
Original file line number Diff line number Diff line change 22
22
- import_playbook : portal.yml
23
23
- import_playbook : monitoring.yml
24
24
- import_playbook : iam.yml
25
- - import_playbook : systemd.yml
26
25
27
26
- name : Run post.yml hook
28
27
vars :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments