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