Restart service on config file modification
This commit is contained in:
parent
a009e377d0
commit
cc223138e4
1 changed files with 8 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
lstrip_blocks: yes
|
||||
trim_blocks: yes
|
||||
mode: 0640
|
||||
register: config_file
|
||||
|
||||
- name: copy Swayidle systemd service file
|
||||
ansible.builtin.copy:
|
||||
|
@ -42,3 +43,10 @@
|
|||
state: started
|
||||
enabled: true
|
||||
when: service_file is changed and not ansible_check_mode
|
||||
|
||||
- name: Restart Swayidle service
|
||||
ansible.builtin.systemd:
|
||||
name: swayidle.service
|
||||
state: restarted
|
||||
scope: user
|
||||
when: config_file is changed and not service_file is changed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue