Created
May 29, 2026 12:36
-
-
Save lifeofguenter/f44bda368cb434211f20e046aceeb18c 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
| - name: Generate cert | |
| ansible.builtin.command: > | |
| certbot | |
| certonly | |
| --email={{ admin_addr_to }} | |
| --agree-tos | |
| --non-interactive | |
| --expand | |
| --key-type=ecdsa | |
| --elliptic-curve=secp384r1 | |
| --webroot | |
| --webroot-path=/var/www/letsencrypt/ | |
| --domain=foobar.com | |
| args: | |
| creates: /etc/letsencrypt/live/foobar.com/privkey.pem | |
| become: true | |
| - name: Add certbot reload-nginx hook | |
| ansible.builtin.copy: | |
| src: reload-nginx.sh | |
| dest: /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh | |
| mode: "a+x" | |
| become: true | |
| when: www_cert_check.stat.exists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment