|
|
@ -5,8 +5,7 @@ |
|
|
|
state: absent |
|
|
|
state: absent |
|
|
|
when: nginx_remove_default_vhost |
|
|
|
when: nginx_remove_default_vhost |
|
|
|
notify: |
|
|
|
notify: |
|
|
|
- validate nginx configuration |
|
|
|
- reload nginx |
|
|
|
- restart nginx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Add managed vhost config file (if any vhosts are configured). |
|
|
|
- name: Add managed vhost config file (if any vhosts are configured). |
|
|
|
template: |
|
|
|
template: |
|
|
@ -15,8 +14,7 @@ |
|
|
|
mode: 0644 |
|
|
|
mode: 0644 |
|
|
|
when: nginx_vhosts|length > 0 |
|
|
|
when: nginx_vhosts|length > 0 |
|
|
|
notify: |
|
|
|
notify: |
|
|
|
- validate nginx configuration |
|
|
|
- reload nginx |
|
|
|
- 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: |
|
|
@ -24,6 +22,5 @@ |
|
|
|
state: absent |
|
|
|
state: absent |
|
|
|
when: nginx_vhosts|length == 0 |
|
|
|
when: nginx_vhosts|length == 0 |
|
|
|
notify: |
|
|
|
notify: |
|
|
|
- validate nginx configuration |
|
|
|
- reload nginx |
|
|
|
- restart nginx |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|