Fix pacemaker_running boolean
In legacy deployments this caused the resource agents to fail being installed because the role was trying to install it on non-pacemaker nodes. Change-Id: Ic841ead2132abfff4ce4c6d739d1afd0cca11ee5 Closes-Bug: #1748196
This commit is contained in:
parent
e2ca161336
commit
7815cc5108
|
@ -105,7 +105,7 @@
|
||||||
|
|
||||||
- include_tasks: resource-agent.yml
|
- include_tasks: resource-agent.yml
|
||||||
when:
|
when:
|
||||||
- pacemaker_running
|
- pacemaker_running|bool
|
||||||
- type != 'opportunistic'
|
- type != 'opportunistic'
|
||||||
- current_vip.ip != ''
|
- current_vip.ip != ''
|
||||||
- inventory_hostname == groups['pacemaker'][0]
|
- inventory_hostname == groups['pacemaker'][0]
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
|
|
||||||
- include_tasks: resource-agent.yml
|
- include_tasks: resource-agent.yml
|
||||||
when:
|
when:
|
||||||
- pacemaker_running
|
- pacemaker_running|bool
|
||||||
- type != 'opportunistic'
|
- type != 'opportunistic'
|
||||||
- redis_in_subnet|bool
|
- redis_in_subnet|bool
|
||||||
- inventory_hostname == groups['pacemaker'][0]
|
- inventory_hostname == groups['pacemaker'][0]
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
force: no
|
force: no
|
||||||
register: resource_agent
|
register: resource_agent
|
||||||
when: pacemaker_running
|
when: pacemaker_running|bool
|
||||||
|
|
||||||
- include_tasks: ipsec-conf.yml
|
- include_tasks: ipsec-conf.yml
|
||||||
with_items: "{{ private_networks }}"
|
with_items: "{{ private_networks }}"
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
- name: Determine which node is hosting the VIP
|
- name: Determine which node is hosting the VIP
|
||||||
shell: pcs status | grep ip- | sed 's/ip-//' | awk '{print $1"\t"$4}' | grep "{{ networks[0]['vips'][0]['ip'] }}" | awk '{print $2}'
|
shell: pcs status | grep ip- | sed 's/ip-//' | awk '{print $1"\t"$4}' | grep "{{ networks[0]['vips'][0]['ip'] }}" | awk '{print $2}'
|
||||||
register: node_hosting_the_vip
|
register: node_hosting_the_vip
|
||||||
when: pacemaker_running
|
when: pacemaker_running|bool
|
||||||
|
|
||||||
- name: Add uniqueids = no to ipsec setup configuration
|
- name: Add uniqueids = no to ipsec setup configuration
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
force: no
|
force: no
|
||||||
register: resource_agent
|
register: resource_agent
|
||||||
when: pacemaker_running
|
when: pacemaker_running|bool
|
||||||
|
|
||||||
# This queries the VIPs for all networks and flattens them into a list
|
# This queries the VIPs for all networks and flattens them into a list
|
||||||
# that contains a dict with the "name" and "ip" for each VIP entry.
|
# that contains a dict with the "name" and "ip" for each VIP entry.
|
||||||
|
@ -65,5 +65,5 @@
|
||||||
loop_var: current_vip
|
loop_var: current_vip
|
||||||
with_items: "{{ networks|default([])|json_query('[*].vips[]')|list }}"
|
with_items: "{{ networks|default([])|json_query('[*].vips[]')|list }}"
|
||||||
when:
|
when:
|
||||||
|
- pacemaker_running|bool
|
||||||
- node_hosting_the_vip.stdout == ansible_hostname
|
- node_hosting_the_vip.stdout == ansible_hostname
|
||||||
- pacemaker_running
|
|
||||||
|
|
Loading…
Reference in New Issue