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