Merge pull request #40 from alexandruavadanii/fix-generate_dhparams

server: Fix generate_dhparams j2 var manipulation
diff --git a/nginx/server.sls b/nginx/server.sls
index 79287c4..f8c9305 100644
--- a/nginx/server.sls
+++ b/nginx/server.sls
@@ -78,14 +78,14 @@
   - require:
     - pkg: nginx_packages
 
-{%- set generate_dhparams = False %}
+{%- set generate_dhparams = { 'enabled': False } %}
 {%- for site_name, site in server.get('site', {}).iteritems() %}
 {%- if site.get('ssl', {}).get('enabled') and site.ssl.get('mode', 'secure') == 'secure' %}
-  {%- set generate_dhparams = True %}
+  {%- do generate_dhparams.update({ 'enabled': True }) %}
 {%- endif %}
 {%- endfor %}
 
-{%- if generate_dhparams %}
+{%- if generate_dhparams['enabled'] %}
 nginx_generate_dhparams:
   cmd.run:
   - name: openssl dhparam -out /etc/ssl/dhparams.pem 2048