diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..cd32b49 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,8 @@ +--- +- name: Restart apache service + service: + name: apache2 + state: restarted + enabled: yes + listen: __ucs_apache_restart + become: True diff --git a/tasks/tls.yml b/tasks/tls.yml index ef6b7d4..61c19bf 100644 --- a/tasks/tls.yml +++ b/tasks/tls.yml @@ -19,6 +19,7 @@ - { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' } loop_control: label: "{{ item.dest }}" + notify: __ucr_apache_restart - name: Set necessary ucr vars ucr: @@ -27,5 +28,6 @@ with_items: - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } + notify: __ucr_apache_restart become: True become_user: root