On 06.02.17 22:04 Michael Spiegle wrote:
> At some point in Ansible 2.0.x, the '{{ansible_user}}' variable
> would reflect the argument passed to ansible-playbook '-u'.  It
> doesn't appear to be doing this any more, and I can't seem to find
> a way to obtain the value that was passed into '-u'.  Is there a
> known way to do this?

Either it is a case of wrong precedence:
https://docs.ansible.com/ansible/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable

But I think I remember having to set the user differently:

ansible-playbook -e 'ansible_user=foobar' ...

Johannes

-- 
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/fd21ec59-89fc-266f-8604-d04da273cc6e%40ojkastl.de.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to