I've also tried wrapping all the tasks in the dynamically included file in
a block and adding a tag to the block. This achieves what I'm trying to
accomplish but doesn't feel like the proper approach.
On Friday, January 19, 2018 at 9:58:05 AM UTC-6, Mike Klebolt wrote:
>
> I'm trying to dynami
The explanation listed at
https://github.com/ansible/ansible/issues/35065#issuecomment-358998670
should hopefully answer your questions.
If you want an attribute to be inherited on the tasks, you should use
`import_tasks` as opposed to `include_tasks`. Attributes on
`include_tasks` should apply t
I won't be able to use 2.5 since import_tasks with a dynamically assigned
variable with fail. Is there a way around this?
---
- name: Test
hosts: localhost
gather_facts: False
connection: local
tasks:
- set_fact:
dynamic_variable: dynamic
- import_tasks: "{{ dynamic_variable
As you have discovered, you will need to use the `block` method if you want
to "easily" apply a tag or set of tags to a group of tasks without tagging
each one individually.
Attributes applied to a dynamic include (include_*) apply to the include
and not to the tasks within. This is the primary p
Thanks Matt. I was able to get everything functioning using the `block`
method. Do you know if this will be revisited in a future release because
I grew to like the include functionality prior to ebf971f?
>
--
You received this message because you are subscribed to the Google Groups
"Ansib