ansible-playbook stops after include

171 views
Skip to first unread message

Michael Legleux

unread,
Aug 28, 2015, 8:36:34 PM8/28/15
to Ansible Project
Here is what I'm trying with ansible 2.0.0 (dev from earlier this week)
---
- hosts: ubuntu 
  gather_facts: true
  sudo: true
  tasks:
  - include: base.yml
  - include: qt5.yml
  - include: wx.yml
  - include: resources.yml


I run this playbook and it stops after qt5 with no errors.If I comment out qt5, it then runs the wx.yml, then stops.
Each include run individually completes fine.
Is this not the way to achieve what I'm trying. I can't see any reason why it doesn't finish the run.

Brian Coca

unread,
Aug 28, 2015, 8:47:06 PM8/28/15
to Ansible Project
what is qt5 doing? does altering the order change the results?
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/72849a45-d0a4-43eb-856c-e6fb2eab487a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian Coca

Michael Legleux

unread,
Sep 1, 2015, 8:54:09 PM9/1/15
to Ansible Project
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:
---
 - name: Adding ubuntu sdk repo
   apt_repository: 
     repo: "ppa:ubuntu-sdk-team/ppa"
     validate_certs: no 
     state: present
 
 - name: updating apt
   apt: update_cache=true
 
 - name: Installing QT5
   apt: name=qt5-default

and the wx.yml is:
---
- name: Adding codelite repo keys
  become:

- name: Adding codelite repo
  apt_repository: repo="deb http://repos.codelite.org/wx3.0/ubuntu precise universe"

- name: Upding apt cache
  apt: update_cache=true

- name: Install wx packages
  apt: pkg={{ item }} state=present
  with_items:
    -  libwxbase3.0-0-unofficial 
    -  libwxbase3.0-dev 
    -  libwxgtk3.0-0-unofficial 
    -  libwxgtk3.0-dev 
    -  wx3.0-headers
    -  wx-common

Altering the order behaves the same, the second include is not actually included.

I just ran this playbook multiple times with every run having all includes commented out in sequence and the end result is correct. Each time, the include is run properly. Now how can I further debug why ansible is stopping when all includes are present?

Michael Legleux

unread,
Sep 2, 2015, 5:08:30 PM9/2/15
to Ansible Project
This configuration works fine with 1.9.2 though.

Bob Tanner

unread,
Sep 3, 2015, 1:30:46 AM9/3/15
to Ansible Project

On Wednesday, September 2, 2015 at 4:08:30 PM UTC-5, Michael Legleux wrote:
This configuration works fine with 1.9.2 though.


-vvvv output shows what?
 

Michael Legleux

unread,
Sep 3, 2015, 4:21:53 PM9/3/15
to Ansible Project
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.

Guy Knights

unread,
Oct 26, 2015, 7:26:23 PM10/26/15
to Ansible Project
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.

Michael Legleux

unread,
Oct 28, 2015, 7:32:09 PM10/28/15
to Ansible Project
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.

Guy Knights

unread,
Oct 29, 2015, 6:14:05 PM10/29/15
to ansible...@googlegroups.com
Here's the content of my parent playbook:

---
# file: playbooks/site.yml
- include: base.yml
- include: monitoring.yml
- include: loadbalancer.yml
- include: appserver.yml
- include: clientserver.yml
- include: gitlab.yml
- include: ci.yml
- include: useractivity.yml
- include: job.yml
- include: vpn.yml
- include: registry.yml
- include: logging.yml
- include: mgmtserver.yml

v2.0 of ansible-playbook completes only the tasks in base.yml and then completes as I already described. Interestingly, it *has* run through the stuff in monitoring.yml when I've tried it before, but it doesn't seem to do it any more. With v1.9.3 of ansible-playbook, it used to run through all the of the above before completing.

--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/ixI71kGSNzw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.

To post to this group, send email to ansible...@googlegroups.com.

Guy Knights

unread,
Nov 27, 2015, 4:54:50 PM11/27/15
to ansible...@googlegroups.com
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.
Reply all
Reply to author
Forward
0 new messages