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 }}"
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user