infra/roles/stable/nginx/tasks/certbot.yml

23 lines
475 B
YAML
Raw Normal View History

2020-11-21 23:42:08 +01:00
---
- name: Install snapd
become: yes
apt:
pkg: ['snapd']
- name: Install snap core
become: yes
snap:
name: core
- name: Install cerbot via snap
become: yes
snap:
name: certbot
classic: yes
- name: Generate certificate if needed
become: yes
command: certbot-auto --nginx --non-interactive --agree-tos
--domains {{ servers | items2dict(key_name='server_name', value_name='server_name') | join(',') }}
--email {{certbot_email}}