Skip to content

Commit d7d7ede

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Set changed_when to false for group_by tasks" into stable/victoria
2 parents b576924 + 3c3b7f3 commit d7d7ede

File tree

6 files changed

+10
-0
lines changed

6 files changed

+10
-0
lines changed

ansible/gather-facts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- name: Group hosts to determine when using --limit
1818
group_by:
1919
key: "all_using_limit_{{ (ansible_play_batch | length) != (groups['all'] | length) }}"
20+
changed_when: false
2021
tags: always
2122

2223
# NOTE(pbourke): This case covers deploying subsets of hosts using --limit. The

ansible/roles/haproxy/handlers/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
re_safe_address: "{{ kolla_internal_vip_address | regex_escape }}"
2525
group_by:
2626
key: kolla_ha_is_master_{{ ip_addr_output.stdout is regex('\b' + re_safe_address + '\b') }}
27+
changed_when: false
2728
when:
2829
- kolla_action != "config"
2930
listen:

ansible/roles/haproxy/tasks/precheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@
1616
- name: Group hosts by whether they are running keepalived
1717
group_by:
1818
key: "keepalived_running_{{ container_facts['keepalived'] is defined }}"
19+
changed_when: false
1920
when:
2021
- enable_keepalived | bool
2122
- inventory_hostname in groups['haproxy']
2223

2324
- name: Group hosts by whether they are running HAProxy
2425
group_by:
2526
key: "haproxy_running_{{ container_facts['haproxy'] is defined }}"
27+
changed_when: false
2628
when:
2729
- enable_haproxy | bool
2830
- inventory_hostname in groups['haproxy']

ansible/roles/keystone/tasks/bootstrap_service.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
- name: Group nodes where keystone_fernet is running
1515
group_by:
1616
key: keystone_fernet_{{ container_facts['keystone_fernet'].State | default('bootstrap') }}
17+
changed_when: false
1718

1819
# NOTE(mgoddard): If we bootstrap Fernet keys on an existing cluster, this
1920
# would overwrite existing keys, and invalidate tokens created from them.

ansible/roles/mariadb/tasks/lookup_cluster.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- name: Divide hosts by their MariaDB volume availability
1111
group_by:
1212
key: mariadb_had_volume_{{ mariadb_volume is not changed }}
13+
changed_when: false
1314

1415
- name: Establish whether the cluster has already existed
1516
set_fact:
@@ -29,6 +30,7 @@
2930
- name: Divide hosts by their MariaDB service port liveness
3031
group_by:
3132
key: mariadb_port_alive_{{ check_mariadb_port_liveness is success }}
33+
changed_when: false
3234

3335
- name: Fail on existing but stopped cluster
3436
fail:
@@ -64,6 +66,7 @@
6466
- name: Divide hosts by their MariaDB service WSREP sync status
6567
group_by:
6668
key: mariadb_sync_status_{{ mariadb_sync_status | default('NA') }}
69+
changed_when: false
6770

6871
- name: Fail when MariaDB services are not synced across the whole cluster
6972
fail:

ansible/site.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
- name: Group hosts based on Kolla action
1212
group_by:
1313
key: "kolla_action_{{ kolla_action }}"
14+
changed_when: false
1415

1516
- name: Group hosts based on enabled services
1617
group_by:
1718
key: "{{ item }}"
19+
changed_when: false
1820
with_items:
1921
- enable_aodh_{{ enable_aodh | bool }}
2022
- enable_barbican_{{ enable_barbican | bool }}

0 commit comments

Comments
 (0)