summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2015-11-10 14:41:31 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2015-11-10 14:41:31 -0500
commit12affae5218733a64ee59637d43e6ae4d84a2f1b (patch)
tree449c2e74384373dfc4695fa0e68e224202e64f1b /roles/openshift_facts/library
parent35c3b7d15cfac7da748382dc4ad429ca78e7c74e (diff)
parent28d601beeebaacd5e79b3fec336a283c8bf20e68 (diff)
downloadopenshift-12affae5218733a64ee59637d43e6ae4d84a2f1b.tar.gz
openshift-12affae5218733a64ee59637d43e6ae4d84a2f1b.tar.bz2
openshift-12affae5218733a64ee59637d43e6ae4d84a2f1b.tar.xz
openshift-12affae5218733a64ee59637d43e6ae4d84a2f1b.zip
Merge pull request #854 from dgoodwin/pkg-ansible-cfg
Package the default ansible.cfg with atomic-openshift-utils.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 932bfd441..c108cd422 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -604,11 +604,17 @@ def set_deployment_facts_if_unset(facts):
config_base = '/etc/origin'
if deployment_type in ['enterprise', 'online']:
config_base = '/etc/openshift'
+ # Handle upgrade scenarios when symlinks don't yet exist:
+ if not os.path.exists(config_base) and os.path.exists('/etc/openshift'):
+ config_base = '/etc/openshift'
facts['common']['config_base'] = config_base
if 'data_dir' not in facts['common']:
data_dir = '/var/lib/origin'
if deployment_type in ['enterprise', 'online']:
data_dir = '/var/lib/openshift'
+ # Handle upgrade scenarios when symlinks don't yet exist:
+ if not os.path.exists(data_dir) and os.path.exists('/var/lib/openshift'):
+ data_dir = '/var/lib/openshift'
facts['common']['data_dir'] = data_dir
for role in ('master', 'node'):