diff --git a/roles/step_acme_cert/handlers/main.yml b/roles/step_acme_cert/handlers/main.yml index fd481c77..a48e6803 100644 --- a/roles/step_acme_cert/handlers/main.yml +++ b/roles/step_acme_cert/handlers/main.yml @@ -2,3 +2,8 @@ service: name: '{{ step_acme_cert_renewal_service }}' state: restarted + +- name: reload affected services + command: systemctl try-reload-or-restart {{ step_acme_cert_renewal_reload_services | join(' ') }} + when: step_acme_cert_renewal_reload_services + ignore_errors: true \ No newline at end of file diff --git a/roles/step_acme_cert/tasks/main.yml b/roles/step_acme_cert/tasks/main.yml index 6731db1c..3752d7b3 100644 --- a/roles/step_acme_cert/tasks/main.yml +++ b/roles/step_acme_cert/tasks/main.yml @@ -29,6 +29,9 @@ become_user: "{{ step_acme_cert_user }}" environment: STEPPATH: "{{ _resolved_steppath }}" + notify: + - reload affected services + - restart renewal service - name: Cert and key permissions are set file: