Nesting Playbooks?

Ansible v1.9.4

I have a playbook that I launch with:

$ ansible-playbook build.yml

build.yml includes set_os.yml (just a set of tasks) that launches some ec2 instances. build.yml looks like this.

`

  • name: Build stuff
    hosts: localhost
    remote_user: ec2-user
    sudo: False
    gather_facts: False
    tasks:
  • include: set_os.yml
  • include: build_soft.yml
    `

At the end of build.yml above, I also include build_soft.yml which is another playbook:

`

Since build_soft.yml is a full playbook and not just a list of tasks, like set_os.yml, the include shouldn’t be indented to the same level. Try de-denting the build_soft.yml as far left as possible, and it should behave as expected.

-Tim

That was it. Thanks.

J