wip: install certbot
This commit is contained in:
parent
e2bf5e9529
commit
8610731ca6
1 changed files with 23 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
- name: Install and upgrade NGINX
|
- name: Install NGINX
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
name: nginx
|
name: nginx
|
||||||
|
@ -8,8 +8,30 @@
|
||||||
retries: 3
|
retries: 3
|
||||||
until: apt_result is succeeded
|
until: apt_result is succeeded
|
||||||
|
|
||||||
|
- name: Install certbot
|
||||||
|
apt:
|
||||||
|
update_cache: true
|
||||||
|
name:
|
||||||
|
- certbot
|
||||||
|
- python3-certbot-nginx
|
||||||
|
state: latest
|
||||||
|
register: apt_result
|
||||||
|
retries: 3
|
||||||
|
until: apt_result is succeeded
|
||||||
|
|
||||||
- name: Copy reverse proxy sites
|
- name: Copy reverse proxy sites
|
||||||
template:
|
template:
|
||||||
src: "nginx/sites-available/reverse_proxy"
|
src: "nginx/sites-available/reverse_proxy"
|
||||||
dest: "/etc/nginx/sites-available/{{ item.from }}"
|
dest: "/etc/nginx/sites-available/{{ item.from }}"
|
||||||
loop: "{{ reverse_proxy_sites }}"
|
loop: "{{ reverse_proxy_sites }}"
|
||||||
|
|
||||||
|
- name: Activate sites
|
||||||
|
file:
|
||||||
|
src: "/etc/nginx/sites-available/{{ item.from }}"
|
||||||
|
dest: "/etc/nginx/sites-enabled/{{ item.from }}"
|
||||||
|
state: link
|
||||||
|
force: yes
|
||||||
|
loop: "{{ reverse_proxy_sites }}"
|
||||||
|
|
||||||
|
- name: Generate Certificate for Domains
|
||||||
|
shell: certbot --nginx
|
||||||
|
|
Loading…
Reference in a new issue