From 2639a0349f29fec2f2a64a68866590f921b7d744 Mon Sep 17 00:00:00 2001 From: Ben Parees Date: Tue, 24 Jan 2017 07:36:00 -0500 Subject: do not set empty proxy env variable defaults --- roles/openshift_facts/library/openshift_facts.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'roles/openshift_facts') 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 -- cgit v1.2.3