Certbot and Nginx disappeared in Ansible conf
This commit is contained in:
parent
b63fa19644
commit
a64dc9ffc2
3 changed files with 85 additions and 0 deletions
21
ansible/roles/4-certbot/tasks/main.yml
Normal file
21
ansible/roles/4-certbot/tasks/main.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
- name: Install basic APT packages
|
||||
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
|
||||
|
||||
- name: Add Certbot configuration
|
||||
template:
|
||||
src: "letsencrypt/conf.d/nk20.ini.j2"
|
||||
dest: "/etc/letsencrypt/conf.d/nk20.ini"
|
||||
mode: 0644
|
||||
Loading…
Add table
Add a link
Reference in a new issue