+ Proof of concept playbooks for pushing website content
So far testing with with athens-freechat.shockrah.xyz HTTP setup is working thus far and so certbot integrations are all that is left. Once those are done creating plays for all other websites should be fairly straight forward
This commit is contained in:
parent
8f029e989f
commit
bba8c30b25
13
playbooks/beta/base-site-conf/freechat.shockrah.xyz
Normal file
13
playbooks/beta/base-site-conf/freechat.shockrah.xyz
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# This file basically contains the base configuration for freechat.shockrah.xyz
|
||||||
|
# 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/freechat;
|
||||||
|
index index.html;
|
||||||
|
server_name athens-freechat.shockrah.xyz;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
}
|
14
playbooks/beta/base-site-conf/shockrah.xyz
Normal file
14
playbooks/beta/base-site-conf/shockrah.xyz
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# This file basically contains the base configuration for freechat.shockrah.xyz
|
||||||
|
# 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/shockrah.xyz;
|
||||||
|
index index.html;
|
||||||
|
server_name shockrah.xyz;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
20
playbooks/beta/local-freechat-push.yml
Normal file
20
playbooks/beta/local-freechat-push.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# This will take care of pushing out
|
||||||
|
---
|
||||||
|
- hosts: web
|
||||||
|
remote_user: web
|
||||||
|
tasks:
|
||||||
|
- name: Clean out remote remote site content
|
||||||
|
file:
|
||||||
|
path: /var/www/freechat
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Push /public directory to /var/www/freechat
|
||||||
|
copy:
|
||||||
|
src: "{{FC_LOCAL_DOCS}}/public"
|
||||||
|
dest: /var/www/
|
||||||
|
|
||||||
|
- name: Pull up public directory
|
||||||
|
command: mv /var/www/public /var/www/freechat
|
||||||
|
|
||||||
|
|
||||||
|
|
25
playbooks/beta/setup-nginx-confs.yml
Normal file
25
playbooks/beta/setup-nginx-confs.yml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
- hosts: beta
|
||||||
|
remote_user: ubuntu
|
||||||
|
become: yes
|
||||||
|
become_method: sudo
|
||||||
|
tasks:
|
||||||
|
- name: Push into sites-available
|
||||||
|
copy:
|
||||||
|
src: "{{item}}"
|
||||||
|
dest: /etc/nginx/sites-available/
|
||||||
|
loop:
|
||||||
|
- base-site-conf/freechat.shockrah.xyz
|
||||||
|
|
||||||
|
- name: Enable Freechat Docs site in Nginx
|
||||||
|
file:
|
||||||
|
src: /etc/nginx/sites-available/freechat.shockrah.xyz
|
||||||
|
dest: /etc/nginx/sites-enabled/freechat.shockrah.xyz
|
||||||
|
state: link
|
||||||
|
- name: Restart Nginx service
|
||||||
|
service:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user