I have just started seeing output on my playbook runs, similar to the following:
statically included: /home/ansible/git/ansible/roles/base/tasks/mail.rc.yml
statically included: /home/ansible/git/ansible/roles/base/tasks/firewall_base.yml
statically included: /home/ansible/git/ansible/roles/base/tasks/repositories_arch.yml
statically included: /home/ansible/git/ansible/roles/base/tasks/repositories_debian.yml
statically included: /home/ansible/git/ansible/roles/base/tasks/repositories_fedora.yml
statically included: /home/ansible/git/ansible/roles/base/tasks/repositories_ubuntu.yml
However, this seems like a bug to me. For example, /home/ansible/git/ansible/roles/base/tasks/repositories_arch.yml shouldn’t be included on this host, because the machine is Debian and I have the following restriction set for including this playbook:
- include: repositories_arch.yml
when: ansible_distribution in [‘Archlinux’, ‘Manjaro Linux’]
So by my logic, that playbook should NOT have been included. I checked the documentation, and I saw that I could add the following to my ansible.cfg:
task_includes_static = False
Regardless of whether I set that to be true or false, it makes no difference. I added it to the [defaults] section, see:
https://github.com/jlacroix82/ansible/blob/master/ansible.cfg
The documentation doesn’t seem to make it clear as far as why I’m seeing “statically included” in my Playbook runs, nor why it’s including playbooks it shouldn’t be including based on the restrictions I set.
Is this a bug?