You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
611 B
20 lines
611 B
---
|
|
- name: Detect combined vhost filename
|
|
set_fact:
|
|
nginx_vhosts_filename: "{{ __nginx_vhosts_filename }}"
|
|
when: nginx_vhosts_filename is not defined
|
|
|
|
- name: Add managed vhost config file (if any vhosts are configured).
|
|
template:
|
|
src: vhosts.j2
|
|
dest: "{{ nginx_vhost_path }}/{{ nginx_vhosts_filename }}"
|
|
mode: 0644
|
|
when: nginx_vhosts|length > 0
|
|
notify: reload nginx
|
|
|
|
- name: Remove managed vhost config file (if no vhosts are configured).
|
|
file:
|
|
path: "{{ nginx_vhost_path }}/{{ nginx_vhosts_filename }}"
|
|
state: absent
|
|
when: nginx_vhosts|length == 0
|
|
notify: reload nginx |