Vizualizing execution of "include_tasks" tasks

30 views
Skip to first unread message

Alex Wanderley

unread,
Jun 7, 2021, 6:04:31 PM6/7/21
to Ansible Project
Hello,

When executing a playbook which has "include_tasks", I can see the message about the tasks file that's being included. For example:

TASK [Expand disks and file systems] *****************
included: /ansible/playbooks/tasks/expand_fs.yml for yyyyyyy
PLAY RECAP ****

Is there a way to tell Ansible to actually show (as it usually happens) which task in the included task file is being executed?

Thanks,

Alex

Brian Coca

unread,
Jun 7, 2021, 7:52:26 PM6/7/21
to Ansible Project
those should be the tasks following the include message



--
----------
Brian Coca

Alex Wanderley

unread,
Jun 8, 2021, 1:22:53 PM6/8/21
to ansible...@googlegroups.com
Hi Brian,

(And sorry for still not getting it yet...)
So, it is indeed not possible to make Ansible echo/display the execution of each task that's inside a file referenced by "include_tasks".
We will only see the echo related to the actual "include_tasks" call.

Regards,

Alex

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CACVha7dpwZ2Y5-V1_-X8NYm8%2B99iAq%2BpnHUX8ZzAEcNNTjgr1A%40mail.gmail.com.


--

 

Edmonton_sig_RGB_S.jpg

Alex Wanderley

Application and Infrastructure Analyst II
UNIX / Storage Team

Financial and Corporate Services | Open City and Technology  

 

780-496-4156  Office

780-819-0273  Mobile

 

City of Edmonton

Century Place, 12th Floor

9803 102A Avenue NW

Edmonton AB, T5J 3A3

 

All information contained in this email post is proprietary to the City of Edmonton, confidential and intended only for the addressed recipient. If you have received this post in error, please disregard the contents, inform the sender of the misdirection, and remove it from your system. The copying, dissemination or distribution of this email, if misdirected, is strictly prohibited.


The contents of this message and any attachment(s) are confidential, proprietary to the City of Edmonton, and are intended only for the addressed recipient. If you have received this in error, please disregard the contents, inform the sender of the misdirection, and remove it from your system. The copying, dissemination, or distribution of this message, if misdirected, is strictly prohibited.

Matt Martz

unread,
Jun 8, 2021, 1:43:28 PM6/8/21
to ansible...@googlegroups.com
Normally you would see it.  What you have indicated seems to state that the tasks within it are not running.

You haven't shown the actual task definition of the `include_tasks` nor how you are running ansible-playbook.

I'm going to guess it's related to tags, but that is just a shot in the dark, as you haven't provided much information to go on.



--
Matt Martz
@sivel
sivel.net

Alex Wanderley

unread,
Jun 8, 2021, 2:12:39 PM6/8/21
to ansible...@googlegroups.com
Hello Matt,

Yes... Assuming that others can see what only you can see is indeed not a good way of asking for help. Sorry about that, Brian.
(I usually pay attention to that, but missed it this time...)

And Matt, your guessing was right: I failed to propagate the tags I'm using on the playbook to the tasks listed in the tasks file referenced by "include_tasks".

Thank you for taking the time to help,

Alex

Reply all
Reply to author
Forward
0 new messages