Setting up all nginx websites on the host

This commit is contained in:
shockrah 2024-04-16 20:37:47 -07:00
parent 31795ea6d9
commit 5337fabe17
4 changed files with 15 additions and 6 deletions

2
infra/static-vultr/ansible/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
inventory.ini
known_hosts

View File

@ -0,0 +1,7 @@
# This playbook basically guarantees that the host is in a production ready state
---
- hosts: webhost
remote_user: root
tasks:
- name: Setup nginx
import_tasks: tasks/nginx-setup.yml

View File

@ -17,18 +17,18 @@
src: "files/{{ item }}" src: "files/{{ item }}"
dest: /etc/nginx/sites-available/ dest: /etc/nginx/sites-available/
loop: loop:
- shockrah.xyz - shockrah.xyz.conf
- resume.shockrah.xyz - resume.shockrah.xyz.conf
- temper.tv - temper.tv.conf
- name: Enable the site configs with sym links - name: Enable the site configs with sym links
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:
- shockrah.xyz - shockrah.xyz.conf
- resume.shockrah.xyz - resume.shockrah.xyz.conf
- temper.tv - temper.tv.conf
- name: Restart nginx conf to pick up new config changes - name: Restart nginx conf to pick up new config changes
service: service:
name: nginx name: nginx