summaryrefslogtreecommitdiffstats
path: root/roles/openshift_master/templates
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-23 15:14:46 -0700
committerGitHub <noreply@github.com>2017-10-23 15:14:46 -0700
commit78ab1bccc4475b66eb9de122a8cc7fcc3752698a (patch)
treee99bee1c4d6b1d59c3cec8608bd85b48ff863545 /roles/openshift_master/templates
parent5c5aa53c0c9e7c12169f9c7e2565a6166f0baf63 (diff)
parentb2df9cc2d5b16a1b1e59d77244e10762e48d72ed (diff)
downloadopenshift-78ab1bccc4475b66eb9de122a8cc7fcc3752698a.tar.gz
openshift-78ab1bccc4475b66eb9de122a8cc7fcc3752698a.tar.bz2
openshift-78ab1bccc4475b66eb9de122a8cc7fcc3752698a.tar.xz
openshift-78ab1bccc4475b66eb9de122a8cc7fcc3752698a.zip
Merge pull request #5654 from vshn/mastersysconfigvar1
Automatic merge from submit-queue. Avoid undefined variable in master sysconfig template When "openshift_master_controllers_env_vars" is set, but "openshift_master_api_env_vars" isn't, the template for the sysconfig file of atomic-openshift-master fails: AnsibleUndefinedVariable: 'dict object' has no attribute 'api_env_vars' Avoid this issue by applying "default({})" to the dict and always calling ".items()".
Diffstat (limited to 'roles/openshift_master/templates')
-rw-r--r--roles/openshift_master/templates/atomic-openshift-master.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/openshift_master/templates/atomic-openshift-master.j2 b/roles/openshift_master/templates/atomic-openshift-master.j2
index 7ec26ceb7..3f7a528a9 100644
--- a/roles/openshift_master/templates/atomic-openshift-master.j2
+++ b/roles/openshift_master/templates/atomic-openshift-master.j2
@@ -21,7 +21,7 @@ AWS_SECRET_ACCESS_KEY={{ openshift_cloudprovider_aws_secret_key }}
{% endif %}
{% if 'api_env_vars' in openshift.master or 'controllers_env_vars' in openshift.master -%}
-{% for key, value in openshift.master.api_env_vars.items() | default([]) | union(openshift.master.controllers_env_vars.items() | default([])) -%}
+{% for key, value in (openshift.master.api_env_vars | default({})).items() | union((openshift.master.controllers_env_vars | default({})).items()) -%}
{{ key }}={{ value }}
{% endfor -%}
{% endif -%}