diff options
author | Ben Parees <bparees@redhat.com> | 2017-01-24 07:36:00 -0500 |
---|---|---|
committer | Ben Parees <bparees@redhat.com> | 2017-01-24 07:37:33 -0500 |
commit | 2639a0349f29fec2f2a64a68866590f921b7d744 (patch) | |
tree | 8a3a7d899c8e49d5f7c82633f2862159bc78c90b | |
parent | 5f92d54e6ea903e9c17c005f5f04caf7443ab06f (diff) | |
download | openshift-2639a0349f29fec2f2a64a68866590f921b7d744.tar.gz openshift-2639a0349f29fec2f2a64a68866590f921b7d744.tar.bz2 openshift-2639a0349f29fec2f2a64a68866590f921b7d744.tar.xz openshift-2639a0349f29fec2f2a64a68866590f921b7d744.zip |
do not set empty proxy env variable defaults
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 12 |
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 |