aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/patches/0001-server-Fix-generate_dhparams-j2-var-manipulation.patch
blob: f2141862c7adbfa74a7523ee96cc3e8c11e35469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2018 Mirantis Inc., Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Tue, 22 May 2018 19:56:47 +0200
Subject: [PATCH] server: Fix generate_dhparams j2 var manipulation

Fixes: 621ee472

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 nginx/server.sls | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 @@ nginx_service:
   - 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