Sfoglia il codice sorgente

restart apache on SSL changes

Dan Milon 9 anni fa
parent
commit
a419d9403b
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7
    0
      roles/common/tasks/ssl.yml

+ 7
- 0
roles/common/tasks/ssl.yml Vedi File

@@ -1,14 +1,17 @@
1 1
 - name: Copy SSL private key into place
2 2
   copy: src=wildcard_private.key dest=/etc/ssl/private/wildcard_private.key group=ssl-cert owner=root mode=640
3 3
   register: private_key
4
+  notify: restart apache
4 5
 
5 6
 - name: Copy SSL public certificate into place
6 7
   copy: src=wildcard_public_cert.crt dest=/etc/ssl/certs/wildcard_public_cert.crt group=root owner=root mode=644
7 8
   register: certificate
9
+  notify: restart apache
8 10
 
9 11
 - name: Copy CA combined certificate into place
10 12
   copy: src=wildcard_ca.pem dest=/etc/ssl/certs/wildcard_ca.pem group=root owner=root mode=644
11 13
   register: ca_certificate
14
+  notify: restart apache
12 15
 
13 16
 - name: Create a combined version of the public cert with intermediate and root CAs
14 17
   shell: cat /etc/ssl/certs/wildcard_public_cert.crt /etc/ssl/certs/wildcard_ca.pem >
@@ -17,15 +20,18 @@
17 20
 
18 21
 - name: Set permissions on combined public cert
19 22
   file: name=/etc/ssl/certs/wildcard_combined.pem mode=644
23
+  notify: restart apache
20 24
 
21 25
 - name: Enable Apache SSL module
22 26
   command: a2enmod ssl creates=/etc/apache2/mods-enabled/ssl.load
27
+  notify: restart apache
23 28
 
24 29
 - name: Enable NameVirtualHost for HTTPS
25 30
   lineinfile:
26 31
     dest=/etc/apache2/ports.conf regexp='^    NameVirtualHost \*:443'
27 32
     insertafter='^<IfModule mod_ssl.c>'
28 33
     line='    NameVirtualHost *:443'
34
+  notify: restart apache
29 35
 
30 36
 - name: Add common Apache SSL config
31 37
   template:
@@ -33,3 +39,4 @@
33 39
     dest=/etc/apache2/ssl.conf
34 40
     owner=root
35 41
     group=root
42
+  notify: restart apache

Loading…
Annulla
Salva