Apply haproxy-service-config tag on include

Rather then applying tag for each task inside the haproxy_service_config
file, it's better to apply it to include. Also, this closes the bug,
when role fails due to fact being undefined,
since setting fact was not covered by the tag.

Change-Id: I533070196dda5387a910f613cdd037fa36880cdb
This commit is contained in:
Dmitriy Rabotyagov 2023-09-26 17:55:37 +02:00 committed by Jonathan Rosser
parent cb4eb8b327
commit e937d08f2c
2 changed files with 4 additions and 4 deletions

View File

@ -54,6 +54,10 @@
- name: Including haproxy_service_config tasks
include_tasks: haproxy_service_config.yml
args:
apply:
tags:
- haproxy-service-config
tags:
- haproxy-service-config

View File

@ -49,8 +49,6 @@
- (service.haproxy_service_enabled | default('True')) | bool
- (service.state is not defined or service.state != 'absent')
notify: Regenerate haproxy configuration
tags:
- haproxy-service-config
- name: Remove haproxy service config files for absent services
file:
@ -65,8 +63,6 @@
when:
- ((service.haproxy_service_enabled | default('True')) | bool) is falsy or
(service.state is defined and service.state == 'absent')
tags:
- haproxy-service-config
###########################################################################
# Map files assembled from fragments from each service into <map-name>.map