diff options
author | Scott Dodson <sdodson@redhat.com> | 2018-02-01 15:00:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-01 15:00:27 -0500 |
commit | 27282928e9fc71fe4ed577f44e9210bba5f3cb2c (patch) | |
tree | dd787fc18b5ef79e3434cc0db9fd86cd5be4e066 | |
parent | 4fe88b001295566d49db1fe711870bf43c40c1ab (diff) | |
parent | 5c8c156cfb3221a5fe541f6f4d94b5487938b923 (diff) | |
download | openshift-27282928e9fc71fe4ed577f44e9210bba5f3cb2c.tar.gz openshift-27282928e9fc71fe4ed577f44e9210bba5f3cb2c.tar.bz2 openshift-27282928e9fc71fe4ed577f44e9210bba5f3cb2c.tar.xz openshift-27282928e9fc71fe4ed577f44e9210bba5f3cb2c.zip |
Merge pull request #6989 from sdodson/vsphere-defaults
Set a default for required vsphere variable
-rw-r--r-- | roles/openshift_default_storage_class/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/openshift_sanitize_inventory/tasks/main.yml | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_default_storage_class/defaults/main.yml b/roles/openshift_default_storage_class/defaults/main.yml index 7ca122fc9..687d60171 100644 --- a/roles/openshift_default_storage_class/defaults/main.yml +++ b/roles/openshift_default_storage_class/defaults/main.yml @@ -1,4 +1,7 @@ --- +# Must not be blank if you're using vsphere +openshift_cloudprovider_vsphere_datacenter: '' + openshift_storageclass_defaults: aws: provisioner: aws-ebs diff --git a/roles/openshift_sanitize_inventory/tasks/main.yml b/roles/openshift_sanitize_inventory/tasks/main.yml index 62d460272..feb5de668 100644 --- a/roles/openshift_sanitize_inventory/tasks/main.yml +++ b/roles/openshift_sanitize_inventory/tasks/main.yml @@ -61,3 +61,17 @@ when: - template_service_broker_remove | default(false) | bool - template_service_broker_install | default(true) | bool + +- name: Ensure that all requires vsphere configuration variables are set + fail: + msg: > + When the vSphere cloud provider is configured you must define all of these variables: + openshift_cloudprovider_vsphere_username, openshift_cloudprovider_vsphere_password, + openshift_cloudprovider_vsphere_host, openshift_cloudprovider_vsphere_datacenter, + openshift_cloudprovider_vsphere_datastore, openshift_cloudprovider_vsphere_folder + when: + - openshift_cloudprovider_kind is defined + - openshift_cloudprovider_kind == 'vsphere' + - ( openshift_cloudprovider_vsphere_username is undefined or openshift_cloudprovider_vsphere_password is undefined or + openshift_cloudprovider_vsphere_host is undefined or openshift_cloudprovider_vsphere_datacenter is undefined or + openshift_cloudprovider_vsphere_datastore is undefined or openshift_cloudprovider_vsphere_folder ) |