summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-11-01 11:37:04 -0700
committerGitHub <noreply@github.com>2017-11-01 11:37:04 -0700
commit5bfc68706be9127199a3f3f06e04588720ed50f5 (patch)
treec70d1fe76bb63fc3844a3a8403eb4d19b50b4fad /roles
parentecc37050ebd06771349eae432747f64b04451bf5 (diff)
parent645ff53669a013723b0fc0f2c1b9bdb5254fa019 (diff)
downloadopenshift-5bfc68706be9127199a3f3f06e04588720ed50f5.tar.gz
openshift-5bfc68706be9127199a3f3f06e04588720ed50f5.tar.bz2
openshift-5bfc68706be9127199a3f3f06e04588720ed50f5.tar.xz
openshift-5bfc68706be9127199a3f3f06e04588720ed50f5.zip
Merge pull request #5974 from tbielawa/bz1504535
Automatic merge from submit-queue. 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')
-rw-r--r--roles/openshift_management/tasks/storage/nfs_server.yml24
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'