From e019e09941ca490967800d988b999068022f7fda Mon Sep 17 00:00:00 2001 From: shockrah Date: Mon, 9 Jan 2023 17:04:43 -0800 Subject: [PATCH] Normalizing sites that need cert updates --- playbooks/alpha/nginx/main.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/playbooks/alpha/nginx/main.yml b/playbooks/alpha/nginx/main.yml index 1b4af10..bddcdf9 100644 --- a/playbooks/alpha/nginx/main.yml +++ b/playbooks/alpha/nginx/main.yml @@ -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 }}"