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
This commit is contained in:
parent
76680e9abd
commit
57577bb369
@ -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'."
|
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:
|
when:
|
||||||
- not galera_ignore_cluster_state | bool
|
- not galera_ignore_cluster_state | bool
|
||||||
- "{{ mysql_running.rc == 0 }}"
|
- mysql_running.rc == 0
|
||||||
- "{{ 'mysql_status' not in hostvars[inventory_hostname] }}"
|
- "{{ 'mysql_status' not in hostvars[inventory_hostname] }}"
|
||||||
|
|
||||||
- fail:
|
- 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'."
|
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:
|
when:
|
||||||
- not galera_ignore_cluster_state | bool
|
- not galera_ignore_cluster_state | bool
|
||||||
- "{{ mysql_running.rc == 0 }}"
|
- mysql_running.rc == 0
|
||||||
- "{{ hostvars[item]['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'] }}"
|
- hostvars[inventory_hostname]['mysql_status']['wsrep_incoming_addresses'] != hostvars[item]['mysql_status']['wsrep_incoming_addresses']
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
galera_existing_cluster: false
|
galera_existing_cluster: false
|
||||||
|
|
||||||
- set_fact:
|
- set_fact:
|
||||||
galera_existing_cluster: true
|
galera_existing_cluster: true
|
||||||
with_items: "{{ play_hosts }}"
|
with_items: play_hosts
|
||||||
when: "{{ hostvars[item].mysql_running.rc == 0 }}"
|
when: hostvars[item].mysql_running.rc == 0
|
||||||
vars:
|
vars:
|
||||||
galera_ignore_cluster_state: false
|
galera_ignore_cluster_state: false
|
||||||
tags:
|
tags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user