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 purpose of dynamic includes. To allow the attributes applied to the include to affect whether or not the include is processed. On Fri, Jan 19, 2018 at 10:53 AM, Mike Klebolt <[email protected]> wrote: > 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 }}.yml" > > > ansible-playbook playbook.yml > Vault password: > ERROR! Error when evaluating variable in include name: {{ dynamic_variable > }}.yml. > > When using static includes, ensure that any variables used in their names > are defined in vars/vars_files > or extra-vars passed in from the command line. Static includes cannot use > variables from inventory > sources like group or host vars. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ansible-project/4d934acc-12a9-46d1-8023-4df47d4e78bc%40googlegroups. > com > <https://groups.google.com/d/msgid/ansible-project/4d934acc-12a9-46d1-8023-4df47d4e78bc%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- Matt Martz @sivel sivel.net -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAD8N0v-OEZ5%3DAHxE3_DK7nq13BYgfxPXsw%2BwRYbYVxvhPnDf5A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
