summaryrefslogtreecommitdiffstats
path: root/roles/openshift_cfme/tasks/validate.yml
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-10-05 09:42:09 -0700
committerGitHub <noreply@github.com>2017-10-05 09:42:09 -0700
commit6f06b5ed6ada0bf22051b7af79bd474ae2398ee9 (patch)
tree2d54f3580de1580c14c956cbd9532338c1193d18 /roles/openshift_cfme/tasks/validate.yml
parent8e2019c9c3840a64425c34c23ace9e9cbd6b7eb0 (diff)
parentd4c1a0443e7c38343752f880d6ae3c2c2c33ab54 (diff)
downloadopenshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.gz
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.bz2
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.tar.xz
openshift-6f06b5ed6ada0bf22051b7af79bd474ae2398ee9.zip
Merge pull request #5336 from tbielawa/cfme_4.6
Automatic merge from submit-queue. Cfme 4.6 # Description * Implements support for **CFME 4.6** in OCP 3.7 * **Replaces** the Tech Preview CFME 4.5 release included in OCP 3.6 * Does not support graceful migrations from the CFME 4.5 tech preview release # References * [Trello - (5) Integrate CFME 4.6 into OCP Installation](https://trello.com/c/Rzfn5Qa8/380-5-integrate-cfme-46-into-ocp-installation) Ensure the following RFE/Errors do not happen again - [x] #4555 - Error creating the CFME user - [x] #4556 - Error in PV template evaluation - [x] #4822 - Changing `maxImagesBulkImportedPerRepository` parameter - [x] #4568 - Add NFS directory support # Features Ensure the following features are configurable in the role - [x] POC deployments can easily default to NFS storage - [ ] Production/Cloud deployments can use automatic storage providers - [ ] Able to select between podified vs. external PostgreSQL database (podified uses configured storage mechanism) - [x] Template resource requests can be overridden for POC deployments
Diffstat (limited to 'roles/openshift_cfme/tasks/validate.yml')
-rw-r--r--roles/openshift_cfme/tasks/validate.yml90
1 files changed, 90 insertions, 0 deletions
diff --git a/roles/openshift_cfme/tasks/validate.yml b/roles/openshift_cfme/tasks/validate.yml
new file mode 100644
index 000000000..1ba813a43
--- /dev/null
+++ b/roles/openshift_cfme/tasks/validate.yml
@@ -0,0 +1,90 @@
+---
+# Validate configuration parameters passed to the openshift_cfme role
+
+######################################################################
+# CORE PARAMETERS
+- name: Ensure openshift_cfme_app_template is valid
+ assert:
+ that:
+ - openshift_cfme_app_template in __openshift_cfme_app_templates
+
+ msg: |
+ "openshift_cfme_app_template must be one of {{
+ __openshift_cfme_app_templates | join(', ') }}"
+
+- name: Ensure openshift_cfme_storage_class is a valid type
+ assert:
+ that:
+ - openshift_cfme_storage_class in __openshift_cfme_storage_classes
+ msg: |
+ "openshift_cfme_storage_class must be one of {{
+ __openshift_cfme_storage_classes | join(', ') }}"
+
+######################################################################
+# STORAGE PARAMS - NFS
+- name: Ensure external NFS storage has a valid NFS server hostname defined
+ assert:
+ that:
+ - openshift_cfme_storage_nfs_external_hostname | default(False)
+ msg: |
+ The selected storage class 'nfs_external' requires a valid
+ hostname for the openshift_cfme_storage_nfs_hostname parameter
+ when:
+ - openshift_cfme_storage_class == 'nfs_external'
+
+- name: Ensure local NFS storage has a valid NFS server to use
+ fail:
+ msg: |
+ No NFS hosts detected or defined but storage class is set to
+ 'nfs'. Add hosts to your [nfs] group or define one manually with
+ the 'openshift_cfme_storage_nfs_local_hostname' parameter
+ when:
+ - openshift_cfme_storage_class == 'nfs'
+ # You haven't created any NFS groups
+ - (groups.nfs is defined and groups.nfs | length == 0) or (groups.nfs is not defined)
+ # You did not manually specify a host to use
+ - (openshift_cfme_storage_nfs_local_hostname is not defined) or (openshift_cfme_storage_nfs_local_hostname == false)
+
+######################################################################
+# STORAGE PARAMS -CLOUD PROVIDER
+- name: Validate Cloud Provider storage class
+ assert:
+ that:
+ - openshift_cloudprovider_kind == 'aws' or openshift_cloudprovider_kind == 'gce'
+ msg: |
+ openshift_cfme_storage_class is 'cloudprovider' but you have an
+ invalid kind defined, '{{ openshift_cloudprovider_kind }}'. See
+ 'openshift_cloudprovider_kind' in the example inventories for
+ the required parameters for your selected cloud
+ provider. Working providers: 'aws' and 'gce'.
+ when:
+ - openshift_cfme_storage_class == 'cloudprovider'
+ - openshift_cloudprovider_kind is defined
+
+- name: Validate 'cloudprovider' Storage Class has required parameters defined
+ assert:
+ that:
+ - openshift_cloudprovider_kind is defined
+ msg: |
+ openshift_cfme_storage_class is 'cloudprovider' but you do not
+ have 'openshift_cloudprovider_kind' defined, this is
+ required. Search the example inventories for
+ 'openshift_cloudprovider_kind'. The required parameters for your
+ selected cloud provider must be defined in your inventory as
+ well. Working providers: 'aws' and 'gce'.
+ when:
+ - openshift_cfme_storage_class == 'cloudprovider'
+
+######################################################################
+# DATABASE CONNECTION VALIDATION
+- name: Validate all required database parameters were provided for ext-db template
+ assert:
+ that:
+ - item in openshift_cfme_template_parameters
+ msg: |
+ "You are using external database services but a required
+ database parameter {{ item }} was not found in
+ 'openshift_cfme_template_parameters'"
+ with_items: "{{ __openshift_cfme_required_db_conn_params }}"
+ when:
+ - openshift_cfme_app_template in ['miq-template-ext-db', 'cfme-template-ext-db']