From 0a324e03a0d39bb205c43b6544740d2d9d9d9144 Mon Sep 17 00:00:00 2001 From: SerenaFeng Date: Mon, 21 Nov 2016 15:14:10 +0800 Subject: deploy testapi to qtip dashboard server add ansible code to deploy testapi in qtip dashboard server JIRA: QTIP-166 Change-Id: I09111ea762d2677061c010e85208105f3f556fc6 Signed-off-by: SerenaFeng --- opt/servers/roles/ngnix/templates/testapi.conf.j2 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 opt/servers/roles/ngnix/templates/testapi.conf.j2 (limited to 'opt/servers/roles/ngnix/templates') diff --git a/opt/servers/roles/ngnix/templates/testapi.conf.j2 b/opt/servers/roles/ngnix/templates/testapi.conf.j2 new file mode 100644 index 00000000..6a4d388b --- /dev/null +++ b/opt/servers/roles/ngnix/templates/testapi.conf.j2 @@ -0,0 +1,17 @@ +# {{ ansible_managed }} + +# servers +# +{% for service in testapi_services %} +server { + listen 80; + listen 443 ssl; + server_name {{ service.name }}.qtip.openzero.net; + location / { + proxy_pass {{ service.upstream }}; + sub_filter {{ service.upstream }} 'http://{{ service.name }}.qtip.openzero.net'; + sub_filter_once off; + sub_filter_types text/html application/json; + } +} +{% endfor %} -- cgit 1.2.3-korg