diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-11-01 10:29:33 -0400 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-11-01 10:29:33 -0400 |
commit | 645ff53669a013723b0fc0f2c1b9bdb5254fa019 (patch) | |
tree | 249eda1ffd02a707203382e4fc548e9757b35b72 /roles/openshift_management/tasks | |
parent | 7a6662385496109ea1a43614937a50f2fc2d0f81 (diff) | |
download | openshift-645ff53669a013723b0fc0f2c1b9bdb5254fa019.tar.gz openshift-645ff53669a013723b0fc0f2c1b9bdb5254fa019.tar.bz2 openshift-645ff53669a013723b0fc0f2c1b9bdb5254fa019.tar.xz openshift-645ff53669a013723b0fc0f2c1b9bdb5254fa019.zip |
Don't use possibly undefined variables in error messages
In an error reporting task we were referencing a variable which may
not have been defined. Even though NFS server detection was working
correctly the undefined variable reference caused an
AnsibleUndefinedVariable error.
* Fixes CFME failing to deploy using external NFS storage
https://bugzilla.redhat.com/show_bug.cgi?id=1504535
Diffstat (limited to 'roles/openshift_management/tasks')
-rw-r--r-- | roles/openshift_management/tasks/storage/nfs_server.yml | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/roles/openshift_management/tasks/storage/nfs_server.yml b/roles/openshift_management/tasks/storage/nfs_server.yml index 96a742c83..a1b618137 100644 --- a/roles/openshift_management/tasks/storage/nfs_server.yml +++ b/roles/openshift_management/tasks/storage/nfs_server.yml @@ -20,12 +20,26 @@ when: - openshift_management_storage_class == "nfs_external" -- name: Failed NFS server detection +- name: Failed External NFS server detection assert: that: - openshift_management_nfs_server is defined msg: | - "Unable to detect an NFS server. The 'nfs_external' - openshift_management_storage_class option requires that you set - openshift_management_storage_nfs_external_hostname. NFS hosts detected - for local nfs services: {{ groups['oo_nfs_to_config'] | join(', ') }}" + Unable to detect an NFS server. The 'nfs_external' + openshift_management_storage_class option requires that you + manually set openshift_management_storage_nfs_external_hostname + parameter. + when: + - openshift_management_storage_class == 'nfs_external' + +- name: Failed Local NFS server detection + assert: + that: + - openshift_management_nfs_server is defined + msg: | + Unable to detect an NFS server. The 'nfs' + openshift_management_storage_class option requires that you have + an 'nfs' inventory group or manually set the + openshift_management_storage_nfs_local_hostname parameter. + when: + - openshift_management_storage_class == 'nfs' |