summaryrefslogtreecommitdiffstats
path: root/roles/openshift_sanitize_inventory/tasks
diff options
context:
space:
mode:
authorEric Wolinetz <ewolinet@redhat.com>2017-09-27 17:03:19 -0500
committerEric Wolinetz <ewolinet@redhat.com>2017-09-27 17:11:17 -0500
commit23c44b36cce3f944a07f4960aa1e1b58f6b12756 (patch)
treec1556db4b6d788689438e44e51a5efd477ddda7b /roles/openshift_sanitize_inventory/tasks
parent3462d2dcf1a35d0cb81314de4cee44863e9cd85d (diff)
downloadopenshift-23c44b36cce3f944a07f4960aa1e1b58f6b12756.tar.gz
openshift-23c44b36cce3f944a07f4960aa1e1b58f6b12756.tar.bz2
openshift-23c44b36cce3f944a07f4960aa1e1b58f6b12756.tar.xz
openshift-23c44b36cce3f944a07f4960aa1e1b58f6b12756.zip
Checking if any openshift_*_storage_kind variables are set to dynamic without enabling dynamic provisioning
Diffstat (limited to 'roles/openshift_sanitize_inventory/tasks')
-rw-r--r--roles/openshift_sanitize_inventory/tasks/unsupported.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/openshift_sanitize_inventory/tasks/unsupported.yml b/roles/openshift_sanitize_inventory/tasks/unsupported.yml
index 24e44ea85..9059cf1ea 100644
--- a/roles/openshift_sanitize_inventory/tasks/unsupported.yml
+++ b/roles/openshift_sanitize_inventory/tasks/unsupported.yml
@@ -10,3 +10,23 @@
Starting in 3.6 openshift_use_dnsmasq must be true or critical features
will not function. This also means that NetworkManager must be installed
enabled and responsible for management of the primary interface.
+
+- set_fact:
+ __using_dynamic: True
+ when:
+ - hostvars[inventory_hostname][item] in ['dynamic']
+ with_items:
+ - "{{ hostvars[inventory_hostname] | vars_with_pattern(pattern='openshift_.*_storage_kind') }}"
+
+- name: Ensure that dynamic provisioning is set if using dynamic storage
+ when:
+ - not openshift_master_dynamic_provisioning_enabled | default(false) | bool
+ - not openshift_cloudprovider_kind is defined
+ - __using_dynamic | bool
+ fail:
+ msg: |-
+ Using a storage kind of 'dynamic' without enabling dynamic provisioning nor
+ setting a cloud provider will cause generated PVCs to not be able to bind as
+ intended. Either update to not use a dynamic storage or set
+ openshift_master_dynamic_provisioning_enabled to True and set an
+ openshift_cloudprovider_kind.