Created
November 28, 2016 10:59
-
-
Save balkian/015554b095b5525e26489c4db33e2270 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
| - hosts: all | |
| name: "Let's encrypt" | |
| tasks: | |
| - name: Add certbot to crontab | |
| cron: name="Letsencrypt certificates" month="*/2" minute=5 hour=0 | |
| cron_file="letsencrypt-autoupdate" | |
| user="root" | |
| job="/usr/bin/docker run -t --rm --name certbot \ | |
| -v '/etc/letsencrypt/:/etc/letsencrypt' \ | |
| -v '/var/lib/letsencrypt:/var/lib/letsencrypt' \ | |
| -v '/var/www/letsencrypt:/webroot' \ | |
| quay.io/letsencrypt/letsencrypt:latest auth --webroot -w /webroot/ \ | |
| -m {{ le_admin }} \ | |
| --expand --agree-tos --keep --quiet \ | |
| -d {{ le_domains | join(' -d ') }}" | |
| vars: | |
| le_admin: [email protected] | |
| le_domains: | |
| - admin.com | |
| become: yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment