Last active
May 30, 2016 12:25
-
-
Save mgedmin/c510afe3a12e669fcab831db9b73bf4b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## hostvars: | |
letsencrypt_certs: | |
- demo.ubuntu.lt | |
- ubuntu.lt, www.ubuntu.lt | |
- legacy.ubuntu.lt | |
## my letsencrypt role's main/tasks.yml: | |
- name: generate certificates | |
command: > | |
/opt/letsencrypt/bin/certbot certonly | |
{% if letsencrypt_dry_run %} | |
--dry-run | |
{% endif %} | |
--text | |
--noninteractive | |
--agree-tos | |
--email "{{ letsencrypt_email }}" | |
--authenticator apache | |
{% if item is string %} | |
--domain "{{ item }}" | |
{% else %} | |
{% for domain in item %} | |
--domain "{{ domain }}" | |
{% endfor %} | |
{% endif %} | |
creates=/etc/letsencrypt/live/{{ item.split(',')[0] if item is string else item[0] }} | |
with_items: | |
- "{{ letsencrypt_certs }}" | |
tags: [ letsencrypt, certs ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment