Skip to content

Tasks in an 'include_tasks' are not run when specifying tags (unlike the deprecated include) #30882

Description

@nilsfr
ISSUE TYPE
  • Bug Report
COMPONENT NAME

ansible/lib/ansible/playbook/block.py

ANSIBLE VERSION
ansible 2.4.0.0
  config file = /home/nilsfr/.ansible.cfg
  configured module search path = [u'/home/nilsfr/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/nilsfr/usit/vortex-vhostlib/venv-vhostlib-py2/local/lib/python2.7/site-packages/ansible
  executable location = /home/nilsfr/usit/vortex-vhostlib/venv-vhostlib-py2/bin/ansible
  python version = 2.7.12 (default, Jul  1 2016, 15:12:24) [GCC 5.4.0 20160609]
SUMMARY

The difference between 'include' and 'include_tags' is in this line:

(task.action == 'include' and task.evaluate_tags([], play_context.skip_tags, all_vars=all_vars)) or

Is this intentional?

In the project I am working on we are relying on the use of tags inside a dynamic include.

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects_2.5This issue/PR affects Ansible v2.5bugThis issue/PR relates to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions