# Proposal for fixing playbooks with dynamic include problems

**URL:** <https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861>\
**Category:** Ansible Project\
**Created:** [March 14, 2016, 4:17pm UTC](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861 "2016-03-14T16:17:02Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![Phonthip\_Namkaew](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@Phonthip\_Namkaew](https://forum.ansible.com/u/Phonthip_Namkaew)\
**Post date:** [March 16, 2016, 10:23pm UTC](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861/21 "2016-03-16T22:23:22Z")

</div>

> Hi

I understand that task-level includes are completely dynamic in 2.0 and therefore the following command / option ( --list-tasks ) can  
not list tasks in the task-level includes at parse time present in playbookfoo.yml :

ansible-playbook playbookfoo.yml --list-tasks

However, I feel that it should at least list the task-level include filenames when using option --list-tasks to indicate  
that there may or may not be further tasks at runtime. This could provide a better idea of what is actually going  
on at ansible-playbook runtime. Of course, this depends strongly on how meaningful the task-level include filenames are.

Phonthip Namkaew

---

<div class="post-metadata">

**Author:** ![chrismeyersfsu](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/chrismeyersfsu/32/1016_2.png) [@chrismeyersfsu](https://forum.ansible.com/u/chrismeyersfsu)\
**Post date:** [April 2, 2016, 4:38pm UTC](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861/22 "2016-04-02T16:38:03Z")

</div>

Also, the start and step feature is effected by the static/dynamic loading [http://docs.ansible.com/ansible/playbooks\_startnstep.html](http://docs.ansible.com/ansible/playbooks_startnstep.html)

---

<div class="post-metadata">

**Author:** ![Dejay\_Clayton](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@Dejay\_Clayton](https://forum.ansible.com/u/Dejay_Clayton)\
**Post date:** [April 6, 2016, 8:31pm UTC](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861/23 "2016-04-06T20:31:44Z")

</div>

So many things are broken with Ansible’s notion of “composability” that it’s hard to know where to begin. I think that’s because Ansible apparently doesn’t know whether it’s a programming language, a descriptor language, declarative, imperative, composable, etc.

Similar to real programming languages, Ansible could require a playbook to “import” (but not execute) all possible playbook names that might be executed by a dynamic include statement. And if a dynamic include attempts to execute a playbook that wasn’t imported, it would fail with an error. For what it’s worth, I personally am never in the position of including a playbook whose name I don’t know in advance.

---

<div class="post-metadata">

**Author:** ![Timothy\_Appnel1](https://avatars.discourse-cdn.com/v4/letter/t/278dde/32.png) [@Timothy\_Appnel1](https://forum.ansible.com/u/Timothy_Appnel1)\
**Post date:** [April 8, 2016, 3:37pm UTC](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861/24 "2016-04-08T15:37:41Z")

</div>

> So many things are broken with Ansible’s notion of “composability” that it’s hard to know where to begin.

[https://github.com/ansible/proposals/pull/4](https://github.com/ansible/proposals/pull/4)

[Previous page](https://forum.ansible.com/t/proposal-for-fixing-playbooks-with-dynamic-include-problems/20861.md?page=1)
