Skip to content

Commit 57ddcc3

Browse files
author
Anton Ustyuzhanin
committed
Fix systemd unit
1 parent 41472e1 commit 57ddcc3

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

handlers/main.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@
3030
service:
3131
name: "{{ sssd_ldap_ssh_service }}"
3232
state: restarted
33+
34+
- name: reload systemd config
35+
systemd:
36+
name: sssd
37+
state: restarted
38+
daemon_reload: yes
39+
when: ansible_distribution_release != 'trusty'

tasks/sssd.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@
1010
notify:
1111
- restart sssd
1212

13+
- name: update systemd service unit
14+
ini_file:
15+
path: /lib/systemd/system/sssd.service
16+
section: "{{ item.section }}"
17+
option: "{{ item.option }}"
18+
value: "{{ item.value }}"
19+
no_extra_spaces: yes
20+
with_items:
21+
- section: Service
22+
option: ExecStartPre
23+
value: "/bin/rm -rf /var/run/sssd.pid || true"
24+
- section: Service
25+
option: Restart
26+
value: always
27+
notify: reload systemd config
28+
1329
- name: sssd | ensure sssd service is enabled
1430
service:
1531
name: sssd

0 commit comments

Comments
 (0)