Normalizing sites that need cert updates

This commit is contained in:
shockrah 2023-01-09 17:04:43 -08:00
parent e830889432
commit e019e09941

View File

@ -5,6 +5,11 @@
--- ---
- hosts: alpha - hosts: alpha
become: yes become: yes
vars:
SITES:
- search.project-athens.xyz
- files.leftcoast.space
- clips.shockrah.xyz
tasks: tasks:
- name: Install Certbot - name: Install Certbot
community.general.snap: community.general.snap:
@ -15,18 +20,14 @@
copy: copy:
src: "{{item}}" src: "{{item}}"
dest: "/etc/nginx/sites-available/{{item}}" dest: "/etc/nginx/sites-available/{{item}}"
loop: loop: "{{ SITES }}"
- search.project-athens.xyz
- files.leftcoast.space
- name: Enable Sites in Nginx - name: Enable Sites in Nginx
file: file:
src: "/etc/nginx/sites-available/{{item}}" src: "/etc/nginx/sites-available/{{item}}"
dest: "/etc/nginx/sites-enabled/{{item}}" dest: "/etc/nginx/sites-enabled/{{item}}"
state: link state: link
loop: loop: "{{ SITES }}"
- search.project-athens.xyz
- files.leftcoast.space
- name: Restart Nginx - name: Restart Nginx
service: service:
@ -37,6 +38,4 @@
command: > command: >
certbot -n --nginx -m "{{CERT_EMAIL}}" --agree-tos certbot -n --nginx -m "{{CERT_EMAIL}}" --agree-tos
--domains "{{item}}" --domains "{{item}}"
loop: loop: "{{ SITES }}"
- search.project-athens.xyz
- files.leftcoast.space