Moving around more stuff
This commit is contained in:
30
deprecated/playbooks/playbooks-deprecated/refresh-nginx.yml
Normal file
30
deprecated/playbooks/playbooks-deprecated/refresh-nginx.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
- hosts: webhost
|
||||
remote_user: root
|
||||
vars:
|
||||
websites:
|
||||
- shockrah.xyz
|
||||
- git.shockrah.xyz
|
||||
- temper.tv
|
||||
- resume.shockrah.xyz
|
||||
tasks:
|
||||
- name: Upload configs
|
||||
copy:
|
||||
src: "../files/{{ item }}.conf"
|
||||
dest: "/etc/nginx/sites-available/{{ item }}"
|
||||
loop: "{{ websites }}"
|
||||
- name: Enable the site configs with sym links
|
||||
file:
|
||||
src: "/etc/nginx/sites-available/{{ item }}"
|
||||
dest: "/etc/nginx/sites-enabled/{{ item }}"
|
||||
state: link
|
||||
loop: "{{ websites }}"
|
||||
- name: Ensure no default available
|
||||
file:
|
||||
path: /etc/nginx/sites-enabled/default
|
||||
state: absent
|
||||
- name: Restart nginx conf to pick up new config changes
|
||||
service:
|
||||
name: nginx
|
||||
state: restarted
|
||||
|
||||
Reference in New Issue
Block a user