Browse Source

openshift_sanitize_inventory: disallow conflicting deployment types

Luke Meyer 8 years ago
parent
commit
3d4fe88809
1 changed files with 13 additions and 0 deletions
  1. 13 0
      roles/openshift_sanitize_inventory/tasks/main.yml

+ 13 - 0
roles/openshift_sanitize_inventory/tasks/main.yml

@@ -1,4 +1,17 @@
 ---
+- name: Abort when conflicting deployment type variables are set
+  when:
+    - deployment_type is defined
+    - openshift_deployment_type is defined
+    - openshift_deployment_type != deployment_type
+  fail:
+    msg: |-
+      openshift_deployment_type is set to "{{ openshift_deployment_type }}".
+      deployment_type is set to "{{ deployment_type }}".
+      To avoid unexpected results, this conflict is not allowed.
+      deployment_type is deprecated in favor of openshift_deployment_type.
+      Please specify only openshift_deployment_type, or make both the same.
+
 - name: Standardize on latest variable names
   set_fact:
     # goal is to deprecate deployment_type in favor of openshift_deployment_type.