mirror of https://github.com/ansible/ansible.git
When templating tags (which happens outside of standard `post_validate`) we
need to template each object in the inheritance chain and set the templated
values on those objects individually. That way when `task.tags` is called the
`extend` functionality properly picks up the templated values of all
parents into one flatten list.
Fixes #81053
(cherry picked from commit 9b3ed5e
)
pull/82092/head
parent
1eb437e50d
commit
a05d254ca2
@ -0,0 +1,2 @@
|
|||||||
|
bugfixes:
|
||||||
|
- Properly template tags in parent blocks (https://github.com/ansible/ansible/issues/81053)
|
@ -0,0 +1,10 @@
|
|||||||
|
- hosts: localhost
|
||||||
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
tags_in_var:
|
||||||
|
- tag1
|
||||||
|
tasks:
|
||||||
|
- block:
|
||||||
|
- name: Tagged_task
|
||||||
|
debug:
|
||||||
|
tags: "{{ tags_in_var }}"
|
Loading…
Reference in New Issue