|
@@ -19,16 +19,35 @@
|
19
|
19
|
register: le_deps_result
|
20
|
20
|
changed_when: "'Bootstrapping dependencies' in le_deps_result.stdout"
|
21
|
21
|
|
|
22
|
+- name: Create directory for pre-renewal scripts
|
|
23
|
+ file: state=directory path=/etc/letsencrypt/prerenew group=root owner=root
|
|
24
|
+
|
22
|
25
|
- name: Create directory for post-renewal scripts
|
23
|
26
|
file: state=directory path=/etc/letsencrypt/postrenew group=root owner=root
|
24
|
27
|
|
|
28
|
+- name: Create pre-renew hook to stop apache
|
|
29
|
+ copy:
|
|
30
|
+ content: "#!/bin/bash\n\nservice apache2 stop\n"
|
|
31
|
+ dest: /etc/letsencrypt/prerenew/apache
|
|
32
|
+ owner: root
|
|
33
|
+ group: root
|
|
34
|
+ mode: 0755
|
|
35
|
+
|
|
36
|
+- name: Create post-renew hook to start apache
|
|
37
|
+ copy:
|
|
38
|
+ content: "#!/bin/bash\n\nservice apache2 start\n"
|
|
39
|
+ dest: /etc/letsencrypt/postrenew/apache
|
|
40
|
+ owner: root
|
|
41
|
+ group: root
|
|
42
|
+ mode: 0755
|
|
43
|
+
|
25
|
44
|
- name: Install crontab entry for LetsEncrypt
|
26
|
45
|
copy:
|
27
|
|
- src=etc_cron-daily_letsencrypt-renew
|
28
|
|
- dest=/etc/cron.daily/letsencrypt-renew
|
29
|
|
- owner=root
|
30
|
|
- group=root
|
31
|
|
- mode=0755
|
|
46
|
+ src: etc_cron-daily_letsencrypt-renew
|
|
47
|
+ dest: /etc/cron.daily/letsencrypt-renew
|
|
48
|
+ owner: root
|
|
49
|
+ group: root
|
|
50
|
+ mode: 0755
|
32
|
51
|
|
33
|
52
|
- name: Create live directory for LetsEncrypt cron job
|
34
|
53
|
file: state=directory path=/etc/letsencrypt/live group=root owner=root
|