ansible/roles/certbot/tasks/main.yml
otthorn 4a57dad8a6
Some checks failed
continuous-integration/drone/push Build is failing
use handlers
2021-01-19 23:19:25 +01:00

26 lines
546 B
YAML

---
- name: Install certbot and nginx plugin
apt:
update_cache: true
name:
- certbot
- python3-certbot-nginx
register: pkg_result
retries: 3
until: pkg_result is succeeded
- name: Create /etc/letsencrypt/conf.d
file:
path: /etc/letsencrypt/conf.d
state: directory
mode: 0755
- name: Add Certbot configuration
template:
src: "letsencrypt/conf.d/certname.ini.j2"
dest: "/etc/letsencrypt/conf.d/{{ certbot.certname }}.ini"
mode: 0644
notify:
- Generate certificates
- Reload nginx