diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-23 18:35:25 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-08-23 18:57:52 +0200 |
commit | aeb8685d4861c6da1f5bd444c7a1ab4ba96a2f24 (patch) | |
tree | 81ec67d9ddff134d9e11b2c669db503251816ca5 /roles/systemd_depend_iface/handlers/service.yml | |
parent | add role systemd_depend_iface (diff) | |
download | infra-ansible-aeb8685d4861c6da1f5bd444c7a1ab4ba96a2f24.tar.gz infra-ansible-aeb8685d4861c6da1f5bd444c7a1ab4ba96a2f24.zip |
systemd_depend_*: don't restart missing services
Diffstat (limited to 'roles/systemd_depend_iface/handlers/service.yml')
-rw-r--r-- | roles/systemd_depend_iface/handlers/service.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/systemd_depend_iface/handlers/service.yml b/roles/systemd_depend_iface/handlers/service.yml new file mode 100644 index 0000000..10ead91 --- /dev/null +++ b/roles/systemd_depend_iface/handlers/service.yml @@ -0,0 +1,6 @@ +- name: 'Restart {{ service }}' + become: true + ansible.builtin.systemd_service: + name: '{{ service }}' + state: restarted + when: service in ansible_facts.services |