summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason DeTiberus <detiber@gmail.com>2017-01-24 11:50:52 -0500
committerGitHub <noreply@github.com>2017-01-24 11:50:52 -0500
commitba7546d14e6b4436682f1c26028a4d872a0b5885 (patch)
treec159e83d9dd7c4a4e10a4008d40f9acc9c3f78ff
parentf7ba230237354b4c82d8514026c4c9a40cadb515 (diff)
parent2639a0349f29fec2f2a64a68866590f921b7d744 (diff)
downloadopenshift-ba7546d14e6b4436682f1c26028a4d872a0b5885.tar.gz
openshift-ba7546d14e6b4436682f1c26028a4d872a0b5885.tar.bz2
openshift-ba7546d14e6b4436682f1c26028a4d872a0b5885.tar.xz
openshift-ba7546d14e6b4436682f1c26028a4d872a0b5885.zip
Merge pull request #3158 from bparees/skip_proxies
do not set empty proxy env variable defaults
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 10121f82a..599793ae9 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1690,9 +1690,21 @@ def set_builddefaults_facts(facts):
if 'admission_plugin_config' not in facts['master']:
facts['master']['admission_plugin_config'] = dict()
facts['master']['admission_plugin_config'].update(builddefaults['config'])
+ # if the user didn't actually provide proxy values, delete the proxy env variable defaults.
+ delete_empty_keys(facts['master']['admission_plugin_config']['BuildDefaults']['configuration']['env'])
+
return facts
+def delete_empty_keys(keylist):
+ count=0
+ c=len(keylist)
+ for i in range(0,c):
+ if len(keylist[i-count]['value'])==0:
+ del keylist[i-count]
+ count+=1
+
+
def set_buildoverrides_facts(facts):
""" Set build overrides