From 026ee129ebb0b09040dc218476bc99ebf4f9de8e Mon Sep 17 00:00:00 2001 From: shockrah Date: Sun, 24 Jul 2022 23:33:50 -0700 Subject: [PATCH] + qrcodes now part of project athens scope --- playbooks/alpha/nginx/main.yml | 6 +++--- .../beta/base-site-conf/qrcodes.leftcoast.space | 13 +++++++++++++ playbooks/beta/certbot.yml | 1 + playbooks/beta/setup-nginx-confs.yml | 10 ++++++---- playbooks/beta/websites/update-qrcodes.yml | 12 ++++++++++++ 5 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 playbooks/beta/base-site-conf/qrcodes.leftcoast.space create mode 100644 playbooks/beta/websites/update-qrcodes.yml diff --git a/playbooks/alpha/nginx/main.yml b/playbooks/alpha/nginx/main.yml index 1bfa413..2484c7b 100644 --- a/playbooks/alpha/nginx/main.yml +++ b/playbooks/alpha/nginx/main.yml @@ -28,7 +28,7 @@ dest: "/etc/nginx/sites-available/{{item}}" loop: - search.project-athens.xyz - - gallery.leftcoast.space + - files.leftcoast.space - name: Enable Sites in Nginx file: @@ -37,7 +37,7 @@ state: link loop: - search.project-athens.xyz - - gallery.leftcoast.space + - files.leftcoast.space - name: Restart Nginx service: @@ -50,4 +50,4 @@ --domains "{{item}}" loop: - search.project-athens.xyz - - gallery.leftcoast.space + - files.leftcoast.space diff --git a/playbooks/beta/base-site-conf/qrcodes.leftcoast.space b/playbooks/beta/base-site-conf/qrcodes.leftcoast.space new file mode 100644 index 0000000..8e43722 --- /dev/null +++ b/playbooks/beta/base-site-conf/qrcodes.leftcoast.space @@ -0,0 +1,13 @@ +# This file basically contains the base configuration for qrcodes.leftcoast.space +# This is to be installed before running certbot against it as this only sets us +# up for correct HTTP(not TLS) based connections + +server { + root /var/www/qrcodes.leftcoast.space; + index index.html; + server_name qrcodes.leftcoast.space; + + location / { + try_files $uri $uri/ =404; + } +} diff --git a/playbooks/beta/certbot.yml b/playbooks/beta/certbot.yml index ce2fdd2..c562cc3 100644 --- a/playbooks/beta/certbot.yml +++ b/playbooks/beta/certbot.yml @@ -16,3 +16,4 @@ - freechat.shockrah.xyz - shockrah.xyz - resume.shockrah.xyz + - qrcodes.leftcoast.space diff --git a/playbooks/beta/setup-nginx-confs.yml b/playbooks/beta/setup-nginx-confs.yml index 7feaf83..4289d3d 100644 --- a/playbooks/beta/setup-nginx-confs.yml +++ b/playbooks/beta/setup-nginx-confs.yml @@ -6,12 +6,13 @@ tasks: - name: Push Nginx Site Configs into available site listings copy: - src: "{{item}}" + src: "base-site-conf/{{item}}" dest: /etc/nginx/sites-available/ loop: - - base-site-conf/freechat.shockrah.xyz - - base-site-conf/resume.shockrah.xyz - - base-site-conf/shockrah.xyz + - freechat.shockrah.xyz + - resume.shockrah.xyz + - shockrah.xyz + - qrcodes.leftcoast.space - name: Enable Static Sites in Nginx file: @@ -22,6 +23,7 @@ - freechat.shockrah.xyz - resume.shockrah.xyz - shockrah.xyz + - qrcodes.leftcoast.space - name: Restart Nginx Service service: diff --git a/playbooks/beta/websites/update-qrcodes.yml b/playbooks/beta/websites/update-qrcodes.yml new file mode 100644 index 0000000..b022dc8 --- /dev/null +++ b/playbooks/beta/websites/update-qrcodes.yml @@ -0,0 +1,12 @@ +--- +- hosts: web + remote_user: web + tasks: + - name: Fetch variables from role specific vars file + include_vars: + file: ../vars/main.yml + - name: Push out qrcodes public content + copy: + src: "{{QRCODES_LOCAL_PUBLIC}}/public/" + dest: /var/www/qrcodes.leftcoast.space + \ No newline at end of file