Setting up all nginx websites on the host
This commit is contained in:
parent
31795ea6d9
commit
5337fabe17
2
infra/static-vultr/ansible/.gitignore
vendored
Normal file
2
infra/static-vultr/ansible/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
inventory.ini
|
||||
known_hosts
|
7
infra/static-vultr/ansible/static-host-setup.yml
Normal file
7
infra/static-vultr/ansible/static-host-setup.yml
Normal 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
|
@ -17,18 +17,18 @@
|
||||
src: "files/{{ item }}"
|
||||
dest: /etc/nginx/sites-available/
|
||||
loop:
|
||||
- shockrah.xyz
|
||||
- resume.shockrah.xyz
|
||||
- temper.tv
|
||||
- shockrah.xyz.conf
|
||||
- resume.shockrah.xyz.conf
|
||||
- temper.tv.conf
|
||||
- name: Enable the site configs with sym links
|
||||
file:
|
||||
src: "/etc/nginx/sites-available/{{ item }}"
|
||||
dest: "/etc/nginx/sites-enabled/{{ item }}"
|
||||
state: link
|
||||
loop:
|
||||
- shockrah.xyz
|
||||
- resume.shockrah.xyz
|
||||
- temper.tv
|
||||
- shockrah.xyz.conf
|
||||
- resume.shockrah.xyz.conf
|
||||
- temper.tv.conf
|
||||
- name: Restart nginx conf to pick up new config changes
|
||||
service:
|
||||
name: nginx
|
||||
|
Loading…
Reference in New Issue
Block a user