File name of the current playbook

25 views
Skip to first unread message

al...@redhat.com

unread,
Mar 15, 2017, 9:50:31 AM3/15/17
to Ansible Project
Hello,

I was looking for a way to get the file name of the current playbook.

Found an old thread, but no workarounds or solutions there.

Our use case is that we would like to log some message in an include with the the playbook file (not the playbook include).

"playbook_dir" is out there, but it holds the directory that the playbook is in.

Any solutions/workarounds?

Cheers

Dick Davies

unread,
Mar 15, 2017, 11:57:31 AM3/15/17
to ansible list
Simple but guaranteed to work: set a var in the playbook, use that.
> --
> 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/ebc938fc-54cb-40a3-8ffc-1f6bffe7e6ce%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages