fix service handling

This commit is contained in:
Robert Kaussow 2018-08-04 22:58:11 +02:00
parent 9f96b7845f
commit 93b54f4491
2 changed files with 10 additions and 0 deletions

8
handlers/main.yml Normal file
View File

@ -0,0 +1,8 @@
---
- name: Restart apache service
service:
name: apache2
state: restarted
enabled: yes
listen: __ucs_apache_restart
become: True

View File

@ -19,6 +19,7 @@
- { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' } - { src: "{{ ucs_tls_cert_path }}", dest: "{{ ucs_tls_key_dir }}/ucs.pem", mode: '0750' }
loop_control: loop_control:
label: "{{ item.dest }}" label: "{{ item.dest }}"
notify: __ucr_apache_restart
- name: Set necessary ucr vars - name: Set necessary ucr vars
ucr: ucr:
@ -27,5 +28,6 @@
with_items: with_items:
- { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" } - { path: apache2/ssl/certificate, value: "{{ ucs_tls_certs_dir }}/ucs.pem" }
- { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" } - { path: apache2/ssl/key, value: "{{ ucs_tls_key_dir }}/ucs.pem" }
notify: __ucr_apache_restart
become: True become: True
become_user: root become_user: root