]> git.immae.eu Git - github/fretlink/ansible-clever.git/commit
fix: statically include sub tasks for 'tags' to work 31/head
authorPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 4 Jan 2019 17:31:43 +0000 (18:31 +0100)
committerPaul Bonaud <paul.bonaud@fretlink.com>
Fri, 4 Jan 2019 17:38:31 +0000 (18:38 +0100)
commitab4d465aa2541ccca2e4c0610b60e53ea9a29c21
tree27c42af7e107b46820cd806979b1be7d1972c31f
parente5697403dacf206a7fe99c2efa9fe03297785446
fix: statically include sub tasks for 'tags' to work

In ansible the `include_tasks` loads the tasks dynamically. Thus it
does not apply the tag specified at the include level to all sub
tasks.

In order to make sure all included tasks inherit the specified `tags:`
we need to include the tasks files "statically". It is very similar to
cases where we have a `when:` condition that we want to apply to all
included subtasks. cf https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#applying-when-to-roles-imports-and-includes
tasks/main.yml