]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ansible: nginx.conf template should use consume the upstreams var
authorAlfredo Deza <adeza@redhat.com>
Thu, 21 Jul 2016 17:06:06 +0000 (13:06 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 22 Jul 2016 12:09:45 +0000 (08:09 -0400)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ansible/roles/nginx/templates/nginx.conf

index dfb451841d3ac5673245a4417b973102e7f091a6..52fe5349271b81247f82e83cfbe3d07db823884a 100644 (file)
@@ -59,15 +59,17 @@ http {
         https on;
     }
 
-    {% for upstream in nginx_upstreams %}
-        upstream {{ upstream.name }} {
-    {% if upstream.strategy is defined %}
-            {{ upstream.strategy }};
+    {% for host in nginx_hosts %}
+      {% if host.upstreams is defined %}
+    upstream {{ host.upstreams.name }} {
+    {% if host.upstreams.strategy is defined %}
+        {{ host.upstreams.strategy }};
     {% endif %}
-    {% for server in upstream.servers %}
-            server {{ server }};
+    {% for server in host.upstreams.servers %}
+            server {{ server }}:443;
     {% endfor %}
     }
+    {% endif %}
     {% endfor %}
 
     ##