From f5827111a7609b3c6f7f72a03c8bc13fee2bbb60 Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Wed, 22 Mar 2017 15:23:29 -0400 Subject: validate and normalize inventory variables In openshift_repos and everywhere, ensure deployment_type and openshift_deployment_type are defined and the same. We really want to set openshift_deployment_type, but users will likely still have just deployment_type, so accept both. And don't make every playbook default openshift_deployment_type to deployment_type. This introduces the openshift_sanitize_inventory role to run before anything else. --- roles/openshift_facts/meta/main.yml | 3 ++- roles/openshift_facts/tasks/main.yml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'roles/openshift_facts') diff --git a/roles/openshift_facts/meta/main.yml b/roles/openshift_facts/meta/main.yml index 0be3afd24..7eead2d6e 100644 --- a/roles/openshift_facts/meta/main.yml +++ b/roles/openshift_facts/meta/main.yml @@ -12,4 +12,5 @@ galaxy_info: categories: - cloud - system -dependencies: [] +dependencies: +- role: openshift_sanitize_inventory diff --git a/roles/openshift_facts/tasks/main.yml b/roles/openshift_facts/tasks/main.yml index 73c668c72..93972f0e0 100644 --- a/roles/openshift_facts/tasks/main.yml +++ b/roles/openshift_facts/tasks/main.yml @@ -64,8 +64,7 @@ role: common local_facts: debug_level: "{{ openshift_debug_level | default(2) }}" - # TODO: Deprecate deployment_type in favor of openshift_deployment_type - deployment_type: "{{ openshift_deployment_type | default(deployment_type) }}" + deployment_type: "{{ openshift_deployment_type }}" deployment_subtype: "{{ openshift_deployment_subtype | default(None) }}" cluster_id: "{{ openshift_cluster_id | default('default') }}" hostname: "{{ openshift_hostname | default(None) }}" -- cgit v1.2.3