ansible-pet/web/roles/nginx/tasks/certbot.yml

20 lines
379 B
YAML
Raw Permalink Normal View History

2021-02-27 15:01:00 +03:00
---
- name: Install certbot package
apt:
name: ['certbot', 'python3-certbot-nginx']
state: present
- name: Get certs using certbot
2021-02-27 15:13:57 +03:00
shell: certbot run --test-cert --register-unsafely-without-email --agree-tos -n -d {{item}}{{domain}} --nginx
loop:
- cloud.
- wiki.
- pma.
-
2021-02-27 15:01:00 +03:00
2021-02-27 15:13:57 +03:00
- name: restart nginx
2021-02-27 15:01:00 +03:00
service:
name: nginx
state: restarted