There is playbook_dir, but not file.

I'd generally argue that if your playbook needs to know the filename of
itself, it has too much self awareness.

I do understand why it would be useful for logging purposes though.

I can see this being useful for things like the {{ ansible_managed }}
template file, as well, though the same role could be applied by different
playbooks.




On Sun, May 25, 2014 at 10:48 PM, <ralov...@gmail.com> wrote:

> Hi List.
>
>
> There are some global variables about a run, like `inventory_dir` or
> `inventory_file`.
> Is their a similar set of variable for the `playbook_file` (when running
> ansible-playbook )?
>
> In the same vein,
> is it possible to retrieve the command line that triggered the run i.e..
> "ansible-playbook -i path/to/inventory path/to/playbook" ?
>
> I would need these for some specific logging purpose.
>
> Thank you.
> raphael.
>
>
>  --
> 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-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/8c8e9499-abcc-4bf8-85be-b62c7bf078b2%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/8c8e9499-abcc-4bf8-85be-b62c7bf078b2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzjKKLw-YnoxZ1axQJiV96Vdj9o3fecbUODvycjh7Rihg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to