mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Create sugarizer/tasks/nginx.yml
This commit is contained in:
parent
b907f5aa1c
commit
e5d30b6c9d
1 changed files with 16 additions and 0 deletions
16
roles/sugarizer/tasks/nginx.yml
Normal file
16
roles/sugarizer/tasks/nginx.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
- name: Enable http://box/sugarizer via NGINX, by installing {{ nginx_conf_dir }}/sugarizer-nginx.conf from template
|
||||||
|
template:
|
||||||
|
src: sugarizer-nginx.conf
|
||||||
|
dest: "{{ nginx_conf_dir }}/sugarizer-nginx.conf" # /etc/nginx/conf.d
|
||||||
|
when: sugarizer_enabled | bool
|
||||||
|
|
||||||
|
- name: Disable http://box/sugarizer via NGINX, by removing {{ nginx_conf_dir }}/sugarizer-nginx.conf
|
||||||
|
file:
|
||||||
|
path: "{{ nginx_conf_dir }}/sugarizer-nginx.conf" # /etc/nginx/conf.d
|
||||||
|
state: absent
|
||||||
|
when: not sugarizer_enabled
|
||||||
|
|
||||||
|
- name: Restart 'nginx' systemd service
|
||||||
|
systemd:
|
||||||
|
name: nginx
|
||||||
|
state: restarted
|
Loading…
Reference in a new issue