I think I've figured out (2) of them:

### Last updated  : {{ ansible_date_time.iso8601 }}{{ ansible_date_time.tz 
}}"
### Last run by   : {{ lookup('env','USER') }}"

But I have no idea how to lookup the Playbook that is calling the roles and 
such:

### Playbook : testbox.yml"

Any pointers?

On Tuesday, April 19, 2016 at 4:06:04 PM UTC-7, Brian Huddleston wrote:
>
> I'm trying to write a task that updates the MODT (Message of the Day) for 
> the target host the playbook is touching.
>
> I'm trying to capture localhost information <name of the playbook> and the 
> <login name of the user running the playbook> and add those to the MOTD for 
> each target host the playbook touches, here is an example:
>
> ### ----------------------------------------------------------------
> ### THIS BOX IS BEING MANAGED BY ANSIBLE:
> ### ----------------------------------------------------------------
> ### Last updated  : Saturday, Apr. 16, 2016
> ### Last playbook : testbox.yml
> ### Last run by   : johndoe
> ###------------------------------------------------------------------
>
> All of the variables and facts I find reference the target machine, not 
> the machine running the commands.
>

-- 
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/b5a35c14-bab9-447f-9d03-f8102b4aac82%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to