From 57577bb369a107ed704f4791090b1c810599258c Mon Sep 17 00:00:00 2001 From: Andy McCrae Date: Thu, 16 Jul 2015 15:09:41 +0100 Subject: [PATCH] Remove {{ from "with_items" and "when" statements This patch resolves a minor issue that was generating a "warning" message when running the galera-install.yml playbook. The "{{" and "}}" are not required for conditionals, and loop expressions, so these can and should safely be removed from "when:" statements and "with_items:" statements. Functionality does not change but the warning message will go away after this patch. Change-Id: I3e9d3a4afb0e3d1284c78a37dba6d1534154a063 Closes-Bug: #1475328 --- playbooks/galera-install.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index 7f0d2acbe2..77958f8961 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -37,25 +37,25 @@ msg: "The cluster may be broken, mysql is running but unable to gather mysql facts. Fix it before re-running the playbook or override with 'openstack-ansible -e galera_ignore_cluster_state=true galera-install.yml'." when: - not galera_ignore_cluster_state | bool - - "{{ mysql_running.rc == 0 }}" + - mysql_running.rc == 0 - "{{ 'mysql_status' not in hostvars[inventory_hostname] }}" - fail: msg: "wsrep_incoming_addresses does not match across the cluster. Please fix before re-running the playbooks or override with 'openstack-ansible -e galera_ignore_cluster_state=true galera-install.yml'." - with_items: "{{ play_hosts }}" + with_items: play_hosts when: - not galera_ignore_cluster_state | bool - - "{{ mysql_running.rc == 0 }}" - - "{{ hostvars[item]['mysql_running']['rc'] == 0 }}" - - "{{ hostvars[inventory_hostname]['mysql_status']['wsrep_incoming_addresses'] != hostvars[item]['mysql_status']['wsrep_incoming_addresses'] }}" + - mysql_running.rc == 0 + - hostvars[item]['mysql_running']['rc'] == 0 + - hostvars[inventory_hostname]['mysql_status']['wsrep_incoming_addresses'] != hostvars[item]['mysql_status']['wsrep_incoming_addresses'] - set_fact: galera_existing_cluster: false - set_fact: galera_existing_cluster: true - with_items: "{{ play_hosts }}" - when: "{{ hostvars[item].mysql_running.rc == 0 }}" + with_items: play_hosts + when: hostvars[item].mysql_running.rc == 0 vars: galera_ignore_cluster_state: false tags: