parent
bfe4a315f9
commit
1d56fc249d
|
@ -55,7 +55,7 @@ You can see many examples in: [tests/test.yml](tests/test.yml).
|
||||||
#### Common
|
#### Common
|
||||||
|
|
||||||
- `name`: (M) Domain or list of domain used.
|
- `name`: (M) Domain or list of domain used.
|
||||||
- `template`: (M) template used to create vhost
|
- `template`: (M) template used to create vhost. Optional if you set `delete` to true.
|
||||||
- `enable`: (O) Enable the vhost (default is true)
|
- `enable`: (O) Enable the vhost (default is true)
|
||||||
- `delete`: (O) Delete the vhost (default is false)
|
- `delete`: (O) Delete the vhost (default is false)
|
||||||
- `redirect_from`: (O) Domain list to redirect to the first `name`. You can use this key to redirect non-www to www
|
- `redirect_from`: (O) Domain list to redirect to the first `name`. You can use this key to redirect non-www to www
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
group={{ item.group | default('www-data') }}
|
group={{ item.group | default('www-data') }}
|
||||||
mode={{ item.mode | default('0755') }}
|
mode={{ item.mode | default('0755') }}
|
||||||
with_items: nginx_vhosts
|
with_items: nginx_vhosts
|
||||||
when: item.root is not defined and item.template != '_proxy'
|
when: >
|
||||||
|
item.root is not defined and
|
||||||
|
(item.template is defined and item.template != '_proxy') and
|
||||||
|
(item.delete is not defined or not item.delete)
|
||||||
|
|
||||||
- name: FILE | Create root public folders (foreach nginx_vhosts)
|
- name: FILE | Create root public folders (foreach nginx_vhosts)
|
||||||
file: >
|
file: >
|
||||||
|
@ -23,7 +26,10 @@
|
||||||
group={{ item.group | default('www-data') }}
|
group={{ item.group | default('www-data') }}
|
||||||
mode={{ item.mode | default('0755') }}
|
mode={{ item.mode | default('0755') }}
|
||||||
with_items: nginx_vhosts
|
with_items: nginx_vhosts
|
||||||
when: item.root is not defined and item.template != '_proxy'
|
when: >
|
||||||
|
item.root is not defined and
|
||||||
|
(item.template is defined and item.template != '_proxy') and
|
||||||
|
(item.delete is not defined or not item.delete)
|
||||||
|
|
||||||
- name: TEMPLATE | Create vhosts
|
- name: TEMPLATE | Create vhosts
|
||||||
template: >
|
template: >
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
template: '_proxy'
|
template: '_proxy'
|
||||||
upstream_name: 'test'
|
upstream_name: 'test'
|
||||||
- name: 'deleted.local'
|
- name: 'deleted.local'
|
||||||
template: '_base'
|
|
||||||
delete: true
|
delete: true
|
||||||
roles:
|
roles:
|
||||||
- ../../
|
- ../../
|
||||||
|
|
Loading…
Reference in New Issue