mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-04-01 12:02:09 +07:00
Add redirection_from test
This commit is contained in:
@@ -8,6 +8,9 @@
|
|||||||
- lineinfile: >
|
- lineinfile: >
|
||||||
dest=/etc/hosts
|
dest=/etc/hosts
|
||||||
line="127.0.2.2 {% for name in nginx_vhosts|map(attribute='name') %}{{ name | join(' ') }} {% endfor %}"
|
line="127.0.2.2 {% for name in nginx_vhosts|map(attribute='name') %}{{ name | join(' ') }} {% endfor %}"
|
||||||
|
- lineinfile: >
|
||||||
|
dest=/etc/hosts
|
||||||
|
line="127.0.3.3 {% for n in nginx_vhosts %}{% if n.redirect_from is defined %}{% for r in n.redirect_from %}{{ r }} {% endfor %}{% endif %}{% endfor %}"
|
||||||
vars:
|
vars:
|
||||||
nginx_php: true
|
nginx_php: true
|
||||||
nginx_php_sockets:
|
nginx_php_sockets:
|
||||||
@@ -20,6 +23,8 @@
|
|||||||
template: '_base'
|
template: '_base'
|
||||||
- name:
|
- name:
|
||||||
- 'test-php.local'
|
- 'test-php.local'
|
||||||
|
redirect_from:
|
||||||
|
- 'www.test-php.local'
|
||||||
template: '_php'
|
template: '_php'
|
||||||
roles:
|
roles:
|
||||||
- ../../
|
- ../../
|
||||||
|
|||||||
Reference in New Issue
Block a user