Simple but guaranteed to work: set a var in the playbook, use that. On 15 March 2017 at 13:07, <[email protected]> wrote: > 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. > https://groups.google.com/forum/#!searchin/ansible-project/playbook_dir|sort:relevance/ansible-project/JMh1zguAAbI/crMsJP-rLZoJ > > 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 > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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.
-- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAK5eLPR7i9d-BnQz2o-g5pOxHJTPM78zqVeJ7OaUZQmrShn7Ow%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
