Restart service on config file modification

This commit is contained in:
Yorick Barbanneau 2023-04-16 22:41:32 +02:00
parent 78e80ac24d
commit 5b4ed11f13

View file

@ -22,6 +22,7 @@
lstrip_blocks: yes
trim_blocks: yes
mode: 0640
register: config_file
- name: Copy Mako systemd service file
ansible.builtin.copy:
@ -44,6 +45,13 @@
enabled: true
when: service_file is change and not ansible_check_mode
- name: Restart Mako service
ansible.builtin.systemd:
name: mako.service
state: restarted
scope: user
when: config_file is changed and not service_file is changed
- name: Render Mako keybinding for sway config file
ansible.builtin.template:
src: '{{ item }}.config.j2'