23 lines
475 B
YAML
23 lines
475 B
YAML
|
---
|
||
|
- 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}}
|