mirror of
https://github.com/geerlingguy/ansible-role-nginx.git
synced 2024-09-07 00:58:04 +02:00
Merge pull request #34 from asagage/fix-vhost-check
updating vhost conditional expressions to check count of list members
This commit is contained in:
commit
1f99c72698
@ -11,12 +11,12 @@
|
|||||||
src: vhosts.j2
|
src: vhosts.j2
|
||||||
dest: "{{ nginx_vhost_path }}/vhosts.conf"
|
dest: "{{ nginx_vhost_path }}/vhosts.conf"
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: nginx_vhosts
|
when: nginx_vhosts|length > 0
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
|
||||||
- name: Remove managed vhost config file (if no vhosts are configured).
|
- name: Remove managed vhost config file (if no vhosts are configured).
|
||||||
file:
|
file:
|
||||||
path: "{{ nginx_vhost_path }}/vhosts.conf"
|
path: "{{ nginx_vhost_path }}/vhosts.conf"
|
||||||
state: absent
|
state: absent
|
||||||
when: not nginx_vhosts
|
when: nginx_vhosts|length == 0
|
||||||
notify: restart nginx
|
notify: restart nginx
|
||||||
|
Loading…
Reference in New Issue
Block a user