Skip to content

Commit

Permalink
Add certbot_staging option
Browse files Browse the repository at this point in the history
  • Loading branch information
royragsdale committed Jun 5, 2020
1 parent ab5cab6 commit 796e6bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions ansible/certbot/tasks/request_certificates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
--agree-tos
-m {{certbot_email}}
-d {{certbot_domain}}
{% if certbot_staging %} --staging {% endif %}
register: certonly
args:
creates: "/etc/letsencrypt/live/{{certbot_domain}}/fullchain.pem"
3 changes: 2 additions & 1 deletion ansible/pico-web/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ enable_basic_auth: false
htpasswd_accounts: []

# SSL with Let's Encrypt
enable_certbot: False
enable_certbot : False
certbot_staging : False

# SSL with out-of-band cert and vault-encrypted key
enable_web_ssl : False
Expand Down
7 changes: 7 additions & 0 deletions env_prod/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ all:
# `ansible_host` for both `web` and `shell` should be domain names.
enable_certbot : True

# NOTE: if you plan on creating/destroying your infrastructure many times
# you might want to consider running in staging mode to prevent hitting a
# rate limit. Switching from live/staging requires some manual administration.
# https://letsencrypt.org/docs/rate-limits/
# https://letsencrypt.org/docs/staging-environment/
certbot_staging: True

# Set whether `ansible_host` is an IP address or a domain name (DNS) In a
# production environment we recommend DNS so that you can easily use SSL/TLS
host_type : "DNS" # valid options 'IP' or 'DNS'
Expand Down

0 comments on commit 796e6bb

Please sign in to comment.