Correct cluster name check

When checking for failed states the cluster name is gathered using
stdout however the conditional is not checking stdout and is attempting
to split a hash which fails rendering an obscure error. This change just
makes the conditional look at stdout and split on a sting.

Change-Id: I73c76fc83274e6f9a0157ad5a75797bebd682adb
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2018-05-31 18:56:52 -05:00
parent 3bc22e89a2
commit 78ea059c93
No known key found for this signature in database
GPG Key ID: 9443251A787B9FB3

View File

@ -48,4 +48,4 @@
cluster state set '-e galera_ignore_cluster_state=true'.
when:
- cluster_name.rc != 0
- (cluster_name.split()[-1] | default(false)) != galera_cluster_name
- (cluster_name.stdout.split()[-1] | default(false)) != galera_cluster_name