mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Manage default vhost. Closes #11
This commit is contained in:
@@ -77,3 +77,17 @@
|
||||
notify: reload nginx
|
||||
when: (item.enable is defined and not item.enable) or (item.delete is defined and item.delete)
|
||||
|
||||
- name: FILE | Delete default vhost when explicitely defined
|
||||
file: >
|
||||
path=/etc/nginx/sites-enabled/default
|
||||
state=absent
|
||||
notify: reload nginx
|
||||
when: nginx_default_vhost is not none
|
||||
|
||||
- name: FILE | Auto set default vhost
|
||||
file: >
|
||||
src=/etc/nginx/sites-available/default
|
||||
dest=/etc/nginx/sites-enabled/default
|
||||
state=link
|
||||
notify: reload nginx
|
||||
when: nginx_default_vhost is none
|
||||
|
||||
Reference in New Issue
Block a user