Commit d73cba90 authored by ale's avatar ale

Restart services when their credentials change

Fixes issue #76.
parent c00408b8
Pipeline #6743 failed with stages
in 12 minutes and 1 second
......@@ -64,6 +64,12 @@
mode: 0640
loop: "{{ float_host_service_credentials_certs }}"
# This should use the systemd module but it doesn't take lists of services.
- name: "Restart associated services"
shell: "systemctl restart {{ services[item.0.service].systemd_services | join(' ') }}"
when: "item.1.changed"
loop: "{{ float_host_service_credentials_certs | zip(x509_sign.results) | list }}"
rescue:
- debug:
msg: "Failed to set up one or more credentials"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment