-
-
Notifications
You must be signed in to change notification settings - Fork 356
/
Copy pathmain.yml
66 lines (55 loc) · 2.09 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
# Certbot auto-renew cron job configuration (for certificate renewals).
certbot_auto_renew: true
certbot_auto_renew_user: "{{ ansible_user | default(lookup('env', 'USER')) }}"
certbot_auto_renew_hour: "3"
certbot_auto_renew_minute: "30"
certbot_auto_renew_options: "--quiet"
certbot_testmode: false
certbot_hsts: false
# Parameters used when creating new Certbot certs.
certbot_create_if_missing: false
certbot_create_method: standalone
certbot_create_extra_args: ""
certbot_admin_email: [email protected]
certbot_expand: false
# Default webroot, overwritten by individual per-cert webroot directories
certbot_webroot: /var/www/letsencrypt
certbot_certs: []
# - email: [email protected]
# webroot: "/var/www/html/"
# domains:
# - example1.com
# - example2.com
# - domains:
# - example3.com
certbot_create_extra_args: ""
certbot_create_command: >-
{{ certbot_script }} certonly --{{ certbot_create_method }}
{{ '--hsts' if certbot_hsts else '' }}
{{ '--test-cert' if certbot_testmode else '' }}
--noninteractive --agree-tos
--email {{ cert_item.email | default(certbot_admin_email) }}
{{ '--expand' if certbot_expand else '' }}
{{ '--webroot-path ' if certbot_create_method == 'webroot' else '' }}
{{ cert_item.webroot | default(certbot_webroot) if certbot_create_method == 'webroot' else '' }}
{{ certbot_create_extra_args }}
-d {{ cert_item.domains | join(',') }}
{{ '--pre-hook /etc/letsencrypt/renewal-hooks/pre/stop_services'
if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'
else '' }}
{{ '--post-hook /etc/letsencrypt/renewal-hooks/post/start_services'
if certbot_create_standalone_stop_services and certbot_create_method == 'standalone'
else '' }}
certbot_create_standalone_stop_services:
- nginx
# - apache
# - varnish
# Available options: 'package', 'snap', 'source'.
certbot_install_method: 'package'
# Source install configuration.
certbot_repo: https://github.com/certbot/certbot.git
certbot_version: master
certbot_keep_updated: true
# Where to put Certbot when installing from source.
certbot_dir: /opt/certbot