|
@@ -3,11 +3,28 @@
|
3
|
3
|
name: ssl-cert
|
4
|
4
|
state: present
|
5
|
5
|
|
6
|
|
-- name: Download LetsEncrypt release
|
7
|
|
- git: repo=https://github.com/letsencrypt/letsencrypt
|
8
|
|
- dest=/root/letsencrypt
|
9
|
|
- version=master
|
10
|
|
- force=yes
|
|
6
|
+- name: add stretch-backport for Certbot
|
|
7
|
+ apt_repository: repo='deb http://deb.debian.org/debian stretch-backports main' state=present update_cache=yes
|
|
8
|
+ tags:
|
|
9
|
+ - dependencies
|
|
10
|
+ when: ansible_distribution_version == '9'
|
|
11
|
+
|
|
12
|
+- name: Install Certbot
|
|
13
|
+ apt:
|
|
14
|
+ name: "certbot"
|
|
15
|
+ state: present
|
|
16
|
+ default_release: stretch-backports
|
|
17
|
+ tags:
|
|
18
|
+ - dependencies
|
|
19
|
+ when: ansible_distribution_version == '9'
|
|
20
|
+
|
|
21
|
+- name: Install Certbot
|
|
22
|
+ apt:
|
|
23
|
+ name: "certbot"
|
|
24
|
+ state: present
|
|
25
|
+ tags:
|
|
26
|
+ - dependencies
|
|
27
|
+ when: ansible_distribution_version == '10'
|
11
|
28
|
|
12
|
29
|
- name: Create directory for LetsEncrypt configuration and certificates
|
13
|
30
|
file: state=directory path=/etc/letsencrypt group=root owner=root
|
|
@@ -19,11 +36,6 @@
|
19
|
36
|
owner=root
|
20
|
37
|
group=root
|
21
|
38
|
|
22
|
|
-- name: Install LetsEncrypt package dependencies
|
23
|
|
- command: /root/letsencrypt/letsencrypt-auto --help
|
24
|
|
- register: le_deps_result
|
25
|
|
- changed_when: "'Bootstrapping dependencies' in le_deps_result.stdout"
|
26
|
|
-
|
27
|
39
|
- name: Create directory for pre-renewal scripts
|
28
|
40
|
file: state=directory path=/etc/letsencrypt/prerenew group=root owner=root
|
29
|
41
|
|