Test proxy with a real back-end: himself
parent
96bbc47d27
commit
a50d7e8774
|
@ -11,7 +11,7 @@
|
|||
nginx_upstreams:
|
||||
- name: 'test'
|
||||
servers:
|
||||
- name: '127.0.0.1:10000'
|
||||
- name: '127.0.0.1:80'
|
||||
max_conns: 150
|
||||
weight: 10
|
||||
down: false
|
||||
|
@ -37,6 +37,8 @@
|
|||
template: '_php'
|
||||
- name:
|
||||
- 'test-proxy.local'
|
||||
listen:
|
||||
- 8080
|
||||
template: '_proxy'
|
||||
upstream_name: 'test'
|
||||
- name:
|
||||
|
@ -51,7 +53,7 @@
|
|||
- name: -- Add HTML file --
|
||||
copy: dest="{{ nginx_root }}/test.local/public/index.html" content="Index HTML test OK\n"
|
||||
- name: -- VERIFY VHOSTS --
|
||||
shell: "curl -H 'Host: {{ item.name[0] }}' http://127.0.0.1/"
|
||||
shell: "curl -H 'Host: {{ item.name[0] }}' http://127.0.0.1{% if item.listen is defined and item.listen is iterable %}:{{ item.listen[0] }}{% endif %}/"
|
||||
with_items: nginx_vhosts
|
||||
when: item.delete is undefined or not item.delete
|
||||
changed_when: false
|
||||
|
|
Loading…
Reference in New Issue