Browse Source

nginx: add the possibility to pass pillar data to website template

Karsten Böddeker 6 years ago
parent
commit
24e7197e58
1 changed files with 2 additions and 1 deletions
  1. 2 1
      nginx/init.sls

+ 2 - 1
nginx/init.sls

@@ -55,11 +55,12 @@ nginx-cache:
       - cmd: nginx-configtest
 
 # Install website configuration files configured for this node
-{% for website in node_config.get('nginx', {}).get('websites', []) %}
+{% for website, website_config in node_config.get('nginx', {}).get('websites', {}).items() %}
 /etc/nginx/sites-enabled/{{website}}:
   file.managed:
     - source: salt://nginx/{{website}}
     - template: jinja
+      config: {{ website_config }}
     - require:
       - pkg: nginx
     - watch_in: