From 57dfae185d3d0e02ebe515263c54867bee37b45e Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Thu, 30 Jun 2016 13:20:10 -0400 Subject: Various hosted component improvements * [openshift_projects] Add openshift_projects role * [openshift_hosted] hosted deployments use openshift_hosted_infra_selector if openshift_hosted__selector is not defined * [openshift_hosted] move openshift_projects, openshift_serviceaccounts and openshift_metrics to dependencies of openshift_hosted * [router] improve router deployment - add router option to force subdomain - add CA to router certificate options * [registry] move registry config into openshift_hosted role - additional registry fixes/tweaks - add s3 storage support for registry * [serviceaccount] fix up serviceaccount creation --- roles/openshift_facts/library/openshift_facts.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'roles/openshift_facts/library') diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 31e70960e..4c551c37e 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -114,6 +114,12 @@ def migrate_hosted_facts(facts): if 'router' not in facts['hosted']: facts['hosted']['router'] = {} facts['hosted']['router']['selector'] = facts['master'].pop('router_selector') + if 'registry_selector' in facts['master']: + if 'hosted' not in facts: + facts['hosted'] = {} + if 'registry' not in facts['hosted']: + facts['hosted']['registry'] = {} + facts['hosted']['registry']['selector'] = facts['master'].pop('registry_selector') return facts def first_ip(network): @@ -466,11 +472,11 @@ def set_selectors(facts): facts['hosted']['router'] = {} if 'selector' not in facts['hosted']['router'] or facts['hosted']['router']['selector'] in [None, 'None']: facts['hosted']['router']['selector'] = selector + if 'registry' not in facts['hosted']: + facts['hosted']['registry'] = {} + if 'selector' not in facts['hosted']['registry'] or facts['hosted']['registry']['selector'] in [None, 'None']: + facts['hosted']['registry']['selector'] = selector - if 'master' in facts: - if 'infra_nodes' in facts['master']: - if 'registry_selector' not in facts['master']: - facts['master']['registry_selector'] = selector return facts def set_metrics_facts_if_unset(facts): -- cgit v1.2.3