diff options
author | Jason DeTiberus <detiber@gmail.com> | 2017-01-24 11:50:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-24 11:50:52 -0500 |
commit | ba7546d14e6b4436682f1c26028a4d872a0b5885 (patch) | |
tree | c159e83d9dd7c4a4e10a4008d40f9acc9c3f78ff | |
parent | f7ba230237354b4c82d8514026c4c9a40cadb515 (diff) | |
parent | 2639a0349f29fec2f2a64a68866590f921b7d744 (diff) | |
download | openshift-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-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 |