how to reference the actual user of a play in a template

Not currently.

I’m open to including “ansible_ssh_user” back into the “inject” data for 1.2 though.

Pull requests would be welcome, or you can file a ticket and I’ll get to it.

One line change, I’m pretty sure.

(see the place where we set inject[“vars”] and so on)

Michael,

I have this problem too, work around it by defining a variable with the username. Would do a fix, but can you give me some more pointers to “where we set inject[“vars”]” is?

Yeah, file a ticket I will look into it this week.

Hello,
I tried to write a patch adding ansible_ssh_user. cf pull request https://github.com/ansible/ansible/pull/3022
I hope it is ok
Jerome

This looks good, in queue for testing, thanks!