Fix vhost enabled removal
This commit is contained in:
parent
1ce67c8f51
commit
9440abe704
|
@ -32,10 +32,17 @@
|
|||
with_items: "{{ nginx_vhosts }}"
|
||||
notify: systemctl restart nginx
|
||||
|
||||
- name: collect all vhost enabled
|
||||
find:
|
||||
paths: /etc/nginx/sites-enabled/
|
||||
patterns: "*.vhost"
|
||||
register: vhost_to_delete
|
||||
|
||||
- name: remove all the vhost enabled
|
||||
file:
|
||||
path: /etc/nginx/sites-enabled/*.vhost
|
||||
path: "{{ item.path }}"
|
||||
state: absent
|
||||
with_items: "{{ vhost_to_delete.files }}"
|
||||
notify: systemctl restart nginx
|
||||
|
||||
- name: add vhost configuration sylink for {{ item.servername }}
|
||||
|
|
Loading…
Reference in a new issue