summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2015-10-23 14:08:40 -0400
committerJason DeTiberus <jdetiber@redhat.com>2015-10-26 15:33:42 -0400
commitaff1356306adf8d02efe06ccbb322b68bef0995d (patch)
tree3e2bb40077fece9ec59ff294cf85bfc38c0f3aa7 /roles/openshift_facts/library
parentdb570ca4fa92560e0ec1b90e1eabe6192f332c61 (diff)
downloadopenshift-aff1356306adf8d02efe06ccbb322b68bef0995d.tar.gz
openshift-aff1356306adf8d02efe06ccbb322b68bef0995d.tar.bz2
openshift-aff1356306adf8d02efe06ccbb322b68bef0995d.tar.xz
openshift-aff1356306adf8d02efe06ccbb322b68bef0995d.zip
make storage plugin dependency installation more flexible
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 3570de693..95ee822a9 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -469,6 +469,21 @@ def set_aggregate_facts(facts):
return facts
+def set_node_plugin_facts_if_unset(facts):
+ """ Set Facts for node storage plugin dependencies if not set.
+
+ Args:
+ facts (dict): existing facts
+ Returns:
+ dict: the facts dict updated with the generated storage plugin
+ dependency facts
+ """
+ if 'node' in facts:
+ if 'storage_plugin_deps' not in facts['node']:
+ facts['node']['storage_plugin_deps'] = ['ceph', 'glusterfs']
+
+ return facts
+
def set_deployment_facts_if_unset(facts):
""" Set Facts that vary based on deployment_type. This currently
includes common.service_type, common.config_base, master.registry_url,
@@ -814,6 +829,7 @@ class OpenShiftFacts(object):
facts = set_identity_providers_if_unset(facts)
facts = set_sdn_facts_if_unset(facts)
facts = set_deployment_facts_if_unset(facts)
+ facts = set_node_plugin_facts_if_unset(facts)
facts = set_aggregate_facts(facts)
return dict(openshift=facts)