Use Ansible for uploading files and managing NGINX
This commit is contained in:
parent
45e8206df8
commit
cd6575c6fc
7 changed files with 489 additions and 3 deletions
16
tools/ansible/reload-nginx.yaml
Normal file
16
tools/ansible/reload-nginx.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
- hosts: all
|
||||
become: true
|
||||
|
||||
vars:
|
||||
domain: www.oliverdavies.uk
|
||||
|
||||
tasks:
|
||||
- ansible.builtin.copy:
|
||||
src: ../nginx/{{ domain }}.conf
|
||||
dest: /etc/nginx/sites-available/{{ domain }}.conf
|
||||
|
||||
- ansible.builtin.file:
|
||||
src: /etc/nginx/sites-available/{{ domain }}.conf
|
||||
dest: /etc/nginx/sites-enabled/{{ domain }}.conf
|
||||
state: link
|
||||
Loading…
Add table
Add a link
Reference in a new issue