# nested playbooks

**URL:** <https://forum.ansible.com/t/nested-playbooks/21924>\
**Category:** Ansible Project\
**Created:** [July 5, 2016, 2:34pm UTC](https://forum.ansible.com/t/nested-playbooks/21924 "2016-07-05T14:34:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dch](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dch/32/7132_2.png) [@dch](https://forum.ansible.com/u/dch)\
**Post date:** [July 5, 2016, 2:34pm UTC](https://forum.ansible.com/t/nested-playbooks/21924/1 "2016-07-05T14:34:18Z")

</div>

Hi

My nested playbooks fail with this error:

$ ansible-playbook site.yml --limit dev

ERROR! no action detected in task. This often indicates a misspelled  
module name, or incorrect module path.

The error appears to have been in '/projects/ansible/base.yml': line 2,  
column 3, but may  
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [July 5, 2016, 3:04pm UTC](https://forum.ansible.com/t/nested-playbooks/21924/2 "2016-07-05T15:04:18Z")

</div>

You have included base, dev and mgmt as task files, not as playbooks.

Just remove the spaces in front and they will be includes as playbooks.

- name: site | deploy and configure all the things  
&nbsp;&nbsp;&nbsp;hosts: all  
&nbsp;&nbsp;&nbsp;become: yes  
&nbsp;&nbsp;&nbsp;gather\_facts: yes  
&nbsp;&nbsp;&nbsp;vars\_files:  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- vars/users.yml  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- vars/iocage.yml  
&nbsp;&nbsp;&nbsp;tasks:

- include: base.yml  
- include: dev.yml  
- include: mgmt.yml

Since you don't have any tasks in the site.yml playbook you can remove tasks:
