# ansible-playbook stops after include

**URL:** <https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142>\
**Category:** Ansible Project\
**Created:** [August 29, 2015, 12:36am UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142 "2015-08-29T00:36:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Legleux](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Michael\_Legleux](https://forum.ansible.com/u/Michael_Legleux)\
**Post date:** [August 29, 2015, 12:36am UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/1 "2015-08-29T00:36:34Z")

</div>

Here is what I’m trying with ansible 2.0.0 (dev from earlier this week)

---

<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:** [August 29, 2015, 12:47am UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/2 "2015-08-29T00:47:01Z")

</div>

what is qt5 doing? does altering the order change the results?

---

<div class="post-metadata">

**Author:** ![Michael\_Legleux](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Michael\_Legleux](https://forum.ansible.com/u/Michael_Legleux)\
**Post date:** [September 2, 2015, 12:54am UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/3 "2015-09-02T00:54:09Z")

</div>

So what I posted before was a simplification to do everything separately.  
Initially, I had a role whose main.yml task includes qt.yml and wx.yml (which are next to main.yml, in roles/common/tasks/)

The qt.yml is:

---

<div class="post-metadata">

**Author:** ![Michael\_Legleux](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Michael\_Legleux](https://forum.ansible.com/u/Michael_Legleux)\
**Post date:** [September 2, 2015, 9:08pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/4 "2015-09-02T21:08:29Z")

</div>

This configuration works fine with 1.9.2 though.

---

<div class="post-metadata">

**Author:** ![Bob\_Tanner](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Bob\_Tanner](https://forum.ansible.com/u/Bob_Tanner)\
**Post date:** [September 3, 2015, 5:30am UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/5 "2015-09-03T05:30:45Z")

</div>

-vvvv output shows what?

---

<div class="post-metadata">

**Author:** ![Michael\_Legleux](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Michael\_Legleux](https://forum.ansible.com/u/Michael_Legleux)\
**Post date:** [September 3, 2015, 8:21pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/6 "2015-09-03T20:21:53Z")

</div>

The output shows no errors, nothing seems wrong.

Running this playbook in devel, after qt5.yml is run, execution stops. If I reverse the order, it only runs wx\_widgets.yml.  
Running this playbook in v1.9.3-0.3.rc3 results with both included playbooks being executed properly.

I simulated the execution order with 2 simpler playbooks (simply touching files on the desktop) and they both get executed properly in devel.

So maybe it’s something with the modules I’m using in wx\_widgets.yml or qt5.yml but they don’t have any obvious errors, and whichever one is run first DOES get installed properly with no errors.  
The only modules the playbooks use are:  
apt\_repository, apt\_key and apt.

I thought maybe I was including things incorrectly, but then testing it in 1.9.3 showed it worked they way I was trying to nest includes. So I’m confused.

---

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [October 26, 2015, 11:26pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/7 "2015-10-26T23:26:23Z")

</div>

I don’t mean to hijack this thread, but I thought I should mention I’m having exactly the same problem. Worked in Ansible 1.9.3, in 2.0.0 it runs through all the tasks/roles in the first couple of includes and then stops (with a play recap), all without any errors.

---

<div class="post-metadata">

**Author:** ![Michael\_Legleux](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Michael\_Legleux](https://forum.ansible.com/u/Michael_Legleux)\
**Post date:** [October 28, 2015, 11:32pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/8 "2015-10-28T23:32:08Z")

</div>

I’m glad you joined in, I never resolved this or got back around to this problem.  
I couldn’t get any useful info about what was causing it either. I made a few super simple examples, but of course they ran fine.  
Part of my experiment involved running each include individually, which worked so I was stymied.

---

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [October 29, 2015, 10:13pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/9 "2015-10-29T22:13:57Z")

</div>

Here’s the content of my parent playbook:

---

<div class="post-metadata">

**Author:** ![Guy\_Knights](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Guy\_Knights](https://forum.ansible.com/u/Guy_Knights)\
**Post date:** [November 27, 2015, 9:54pm UTC](https://forum.ansible.com/t/ansible-playbook-stops-after-include/19142/10 "2015-11-27T21:54:45Z")

</div>

As a quick follow-up on this, I since tried rolling back to stable-1.9 and also the 1.9.3 tag as well, and interestingly neither of those would execute past a specific point in my base.yaml playbook. When it reaches the specific task, ansible hangs…if I comment out this task and re-run, it then gets to the next task in the order but hangs on that one.

So, the plot thickens. In any case, this is really causing problems for me as I have to run all my playbooks individually, and I might have to look at breaking my base.yml up into different playbooks as it now doesn’t complete.
