Play's included_path does not have playbook file name?

14 views
Skip to first unread message

LeiLei W

unread,
Apr 6, 2017, 3:58:03 PM4/6/17
to Ansible Project
Hi everyone

I installed the latest ansible version by: pip install git+git://github.com/ansible/ansible.git@devel

My ansible version is:  ansible 2.4.0. 

I am implementing the callback to send some updates for each task, and I need to construct the task name as playbook:play:task, I have a playbook /tmp/A.yml that includes another playbook /tmp/B.yml,

B has one playB with three tasks, so when construct name of tasks in B, I need to put B:playB:task1. I was trying to get the file name of B by using play._included_path when it calls playB, but it returns "/tmp/" only.

Should it return "/tmp/B.yml"? I checked the source code of playbook_include.py, when it loads playbook B, it should fill up the file_name of the B. 

Could anyone please help me with this issue?

Thanks
Best regards

Leilei
Reply all
Reply to author
Forward
0 new messages