diff options
author | Jason DeTiberus <detiber@gmail.com> | 2016-05-13 13:38:23 -0400 |
---|---|---|
committer | Jason DeTiberus <detiber@gmail.com> | 2016-05-13 13:38:23 -0400 |
commit | 891e38c6e013854c304ab7bbd84095516fe4399f (patch) | |
tree | 785080a8d094be10116011517ca3b0f958fd95af /roles/openshift_facts | |
parent | 4620c608c18f3b0486a95e35c5fc217f9aae6c85 (diff) | |
parent | a79d25b64bca2b95fb5cb2c2420fd9d10bfd1337 (diff) | |
download | openshift-891e38c6e013854c304ab7bbd84095516fe4399f.tar.gz openshift-891e38c6e013854c304ab7bbd84095516fe4399f.tar.bz2 openshift-891e38c6e013854c304ab7bbd84095516fe4399f.tar.xz openshift-891e38c6e013854c304ab7bbd84095516fe4399f.zip |
Merge pull request #1862 from abutcher/v2-vars-files-upgrade
Remove vars_files on play includes for upgrade playbooks.
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index cb8301da4..b1ad537bc 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -19,8 +19,8 @@ EXAMPLES = ''' import ConfigParser import copy +import io import os -import StringIO import yaml from distutils.util import strtobool from distutils.version import LooseVersion @@ -689,7 +689,7 @@ def set_etcd_facts_if_unset(facts): If anything goes wrong parsing these, the fact will not be set. """ - if 'master' in facts and facts['master']['embedded_etcd']: + if 'master' in facts and safe_get_bool(facts['master']['embedded_etcd']): etcd_facts = facts['etcd'] if 'etcd' in facts else dict() if 'etcd_data_dir' not in etcd_facts: @@ -716,8 +716,8 @@ def set_etcd_facts_if_unset(facts): # Read ETCD_DATA_DIR from /etc/etcd/etcd.conf: try: # Add a fake section for parsing: - ini_str = '[root]\n' + open('/etc/etcd/etcd.conf', 'r').read() - ini_fp = StringIO.StringIO(ini_str) + ini_str = unicode('[root]\n' + open('/etc/etcd/etcd.conf', 'r').read(), 'utf-8') + ini_fp = io.StringIO(ini_str) config = ConfigParser.RawConfigParser() config.readfp(ini_fp) etcd_data_dir = config.get('root', 'ETCD_DATA_DIR') |