Do not use 'always' tag in inappropriate places

Using 'always' tag in combination with condition depending on
variables is not always a good idea because these variables may not be
defined at the moment.

Currently, rabbitmq_server role cannot be executed with tag limit,
because task containing 'always' tag has a condition operating on
variable(s) that are registered only when 'rabbitmq-config' tag is being
used.

Change-Id: I7ef7b3fed79933b4c8bbc39a63ca6db54532e10e
This commit is contained in:
Damian Dabrowski 2023-03-01 18:33:46 +01:00 committed by Dmitriy Rabotyagov
parent 98a7f71d17
commit e6f1c69558
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@
tags: rabbitmq-config
when: rabbit_config is changed or rabbitmq_plugin is changed or (cookie_set is defined and cookie_set is changed) or rabbitmq_upgrade | bool
tags:
- always
- rabbitmq-config
- name: Apply rabbitmq policies
community.rabbitmq.rabbitmq_policy:
@ -94,7 +94,7 @@
tags: rabbitmq-config
when: rabbitmq_policy is changed
tags:
- always
- rabbitmq-config
# This is being done because the rabbitctl command used by the module
# is not very effective at returning proper status codes for failure