- Include Help. Include at start of playbook

33 views
Skip to first unread message

Chris Kerr

unread,
Sep 29, 2015, 9:55:25 AM9/29/15
to Ansible Project
Hi all

I need some help with this.

What I require is the start of my elk playbook to call another playbook called (Katello)

Whenever i run the playbook with the include at the start - It Ignores any tasks underneath it and ends.
I've tried this every which way and am at a loss.
How can I get this to work?? Ive tried looking everywhere for Include Syntax and read ansible up and running but everywhere i read shows an include at the very end of a playbook.

In this example the register-katello playbook is run - but then thats it - I need it to continue on to the tasks underneath once complete.

- hosts: all

  sudo
:  yes

- include: ../register_katello/register-katello.yml

  tasks
:

   
- name: TEST
     shell
: echo "TEST"


Igor Cicimov

unread,
Sep 29, 2015, 7:32:50 PM9/29/15
to Ansible Project
- hosts: all
sudo: yes
tasks:
- include: ../register_katello/register-katello.yml

Brian Coca

unread,
Sep 30, 2015, 11:34:40 PM9/30/15
to Ansible Project
depends on what register-katello.yml contains, if it is a full play:

- include: ../register_katello/register-katello.yml
- hosts: all
sudo: yes
tasks:
- name: TEST
shell: echo "TEST"

if it is just a list of tasks, do as Igor shows.



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages