# Confused about "statically included" playbooks in version "2.1.2.0"

**URL:** <https://forum.ansible.com/t/confused-about-statically-included-playbooks-in-version-2-1-2-0/22734>\
**Category:** Ansible Project\
**Created:** [October 6, 2016, 7:56pm UTC](https://forum.ansible.com/t/confused-about-statically-included-playbooks-in-version-2-1-2-0/22734 "2016-10-06T19:56:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jay\_LaCroix](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@Jay\_LaCroix](https://forum.ansible.com/u/Jay_LaCroix)\
**Post date:** [October 6, 2016, 7:56pm UTC](https://forum.ansible.com/t/confused-about-statically-included-playbooks-in-version-2-1-2-0/22734/1 "2016-10-06T19:56:00Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 8, 2016, 12:19am UTC](https://forum.ansible.com/t/confused-about-statically-included-playbooks-in-version-2-1-2-0/22734/2 "2016-10-08T00:19:37Z")

</div>

We have updated ansible to not be that verbose, you should only see that output now if -vv or higher verbosity is required.

As for the `when:` it will not prevent the inclusion of a static include, it will be applied as an additional condition to all the included tasks, this has always been the case. Only dynamic TASK includes can be conditionally avoided.

Play includes are never dynamic.

The config should have worked, try this as an alternative to making all includes dynamic:

- include: repositories\_arch.yml  
static: no  
when: ansible\_distribution in [‘Archlinux’, ‘Manjaro Linux’]
