Merge "Handle edge cases in staged upgrade hiera data" into stable/stein

This commit is contained in:
Zuul 2019-08-08 17:18:10 +00:00 committed by Gerrit Code Review
commit 07ab628000
7 changed files with 28 additions and 14 deletions

View File

@ -424,13 +424,15 @@ outputs:
mysql_short_node_names_upgraded: "{{ mysql_short_node_names }}"
mysql_node_names_upgraded: "{{ mysql_node_names }}"
cacheable: no
when: groups['mysql'] | length == 1
when: groups['mysql'] | length <= 1
- name: set mysql upgrade node facts from the limit option
set_fact:
mysql_short_node_names_upgraded: "{{ mysql_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
mysql_node_names_upgraded: "{{ mysql_node_names_upgraded|default([]) + [item] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['mysql'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ mysql_node_names }}"
- debug:

View File

@ -362,12 +362,14 @@ outputs:
set_fact:
redis_short_node_names_upgraded: "{{ redis_short_node_names }}"
cacheable: no
when: groups['redis'] | length == 1
when: groups['redis'] | length <= 1
- name: set redis upgrade node facts from the limit option
set_fact:
redis_short_node_names_upgraded: "{{ redis_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['redis'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ redis_short_node_names }}"
- debug:

View File

@ -443,12 +443,14 @@ outputs:
set_fact:
haproxy_short_node_names_upgraded: "{{ haproxy_short_node_names }}"
cacheable: no
when: groups['haproxy'] | length == 1
when: groups['haproxy'] | length <= 1
- name: set haproxy upgrade node facts from the limit option
set_fact:
haproxy_short_node_names_upgraded: "{{ haproxy_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['haproxy'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ haproxy_short_node_names }}"
- debug:

View File

@ -323,13 +323,15 @@ outputs:
oslo_messaging_notify_short_node_names_upgraded: "{{ oslo_messaging_notify_short_node_names }}"
oslo_messaging_notify_node_names_upgraded: "{{ oslo_messaging_notify_node_names }}"
cacheable: no
when: groups['oslo_messaging_notify'] | length == 1
when: groups['oslo_messaging_notify'] | length <= 1
- name: set oslo_messaging_notify upgrade node facts from the limit option
set_fact:
oslo_messaging_notify_short_node_names_upgraded: "{{ oslo_messaging_notify_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
oslo_messaging_notify_node_names_upgraded: "{{ oslo_messaging_notify_node_names_upgraded|default([]) + [item] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['oslo_messaging_notify'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ oslo_messaging_notify_node_names }}"
- debug:

View File

@ -321,12 +321,14 @@ outputs:
set_fact:
rabbitmq_short_node_names_upgraded: "{{ rabbitmq_short_node_names }}"
cacheable: no
when: groups['rabbitmq'] | length == 1
when: groups['rabbitmq'] | length <= 1
- name: set rabbitmq upgrade node facts from the limit option
set_fact:
rabbitmq_short_node_names_upgraded: "{{ rabbitmq_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['rabbitmq'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ rabbitmq_short_node_names }}"
- debug:

View File

@ -322,13 +322,15 @@ outputs:
oslo_messaging_rpc_short_node_names_upgraded: "{{ oslo_messaging_rpc_short_node_names }}"
oslo_messaging_rpc_node_names_upgraded: "{{ oslo_messaging_rpc_node_names }}"
cacheable: no
when: groups['oslo_messaging_rpc'] | length == 1
when: groups['oslo_messaging_rpc'] | length <= 1
- name: set oslo_messaging_rpc upgrade node facts from the limit option
set_fact:
oslo_messaging_rpc_short_node_names_upgraded: "{{ oslo_messaging_rpc_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
oslo_messaging_rpc_node_names_upgraded: "{{ oslo_messaging_rpc_node_names_upgraded|default([]) + [item] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['oslo_messaging_rpc'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ oslo_messaging_rpc_node_names }}"
- debug:

View File

@ -183,12 +183,14 @@ outputs:
set_fact:
pacemaker_short_node_names_upgraded: "{{ pacemaker_short_node_names }}"
cacheable: no
when: groups['pacemaker'] | length == 1
when: groups['pacemaker'] | length <= 1
- name: set pacemaker upgrade node facts from the limit option
set_fact:
pacemaker_short_node_names_upgraded: "{{ pacemaker_short_node_names_upgraded|default([]) + [item.split('.')[0]] }}"
cacheable: no
when: item.split('.')[0] in ansible_limit.split(',')
when:
- groups['pacemaker'] | length > 1
- item.split('.')[0] in ansible_limit.split(',')
loop: "{{ pacemaker_short_node_names }}"
- debug: