Skip to content
Snippets Groups Projects
Commit d73cba90 authored by ale's avatar ale
Browse files

Restart services when their credentials change

Fixes issue #76.
parent c00408b8
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,12 @@ ...@@ -64,6 +64,12 @@
mode: 0640 mode: 0640
loop: "{{ float_host_service_credentials_certs }}" 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: rescue:
- debug: - debug:
msg: "Failed to set up one or more credentials" msg: "Failed to set up one or more credentials"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment