Fix common role when using external mariadb

If the common role is executed against a set of hosts that are not all
in the fluentd group, the run_once tasks that find customisations may be
skipped. This causes a later failure when accessing the registered
variables for those tasks.

This issue was raised on the mailing list:
http://lists.openstack.org/pipermail/openstack-discuss/2020-September/016932.html

This issue only affects the master branch, due to addition of groups
for the common role in I6a4676bf6efeebc61383ec7a406db07c7a868b2a.

This change fixes the issue by always running the find tasks, if fluentd
is enabled.

Change-Id: I559c4b94d18c7f36d43e1d88629ed44668abf859
This commit is contained in:
Mark Goddard 2020-09-02 09:27:14 +01:00
parent cccfa8f378
commit 6882013309

View File

@ -72,7 +72,7 @@
run_once: True
register: find_custom_fluentd_inputs
delegate_to: localhost
when: common_services.fluentd | service_enabled_and_mapped_to_host
when: common_services.fluentd.enabled | bool
- name: Find custom fluentd filter config files
find:
@ -81,7 +81,7 @@
run_once: True
register: find_custom_fluentd_filters
delegate_to: localhost
when: common_services.fluentd | service_enabled_and_mapped_to_host
when: common_services.fluentd.enabled | bool
- name: Find custom fluentd format config files
find:
@ -90,8 +90,7 @@
run_once: True
register: find_custom_fluentd_formats
delegate_to: localhost
when:
- common_services.fluentd | service_enabled_and_mapped_to_host
when: common_services.fluentd.enabled | bool
- name: Find custom fluentd output config files
find:
@ -100,8 +99,7 @@
run_once: True
register: find_custom_fluentd_outputs
delegate_to: localhost
when:
- common_services.fluentd | service_enabled_and_mapped_to_host
when: common_services.fluentd.enabled | bool
- name: Copying over td-agent.conf
vars: