It is -- it's called ansible_ssh_user.

Originally the variable in ansible was called "user" but to avoid confusion
when used with the "user" module, remote_user is an alias.





On Wed, Aug 27, 2014 at 3:42 PM, Jeremy Gailor <[email protected]> wrote:

> Michael,
>
> This is super helpful.  Thanks.   Since you would be in the know, is there
> any reason that remote_user is not passed down to roles, etc.?  It seems
> like it would be something useful to have access to, and was a surprise
> when I didn't.
>
>
> On Wednesday, 27 August 2014 12:06:47 UTC-7, Michael DeHaan wrote:
>
>> This isn't an output variable that you can use in a template anywhere.
>>
>> You may be interested in the value of {{ ansible_ssh_user }}
>>
>>
>>
>>
>> On Wed, Aug 27, 2014 at 12:49 PM, Jeremy Gailor <[email protected]> wrote:
>>
>>> I was running a playbook and referencing remote_user in a file under
>>> /roles/my_role/tasks/deploy.yml, (included in
>>> /roles/my_role/tasks/main.yml) and Ansible was giving me an error that
>>> {{remote_user}} did not exist.
>>>
>>>
>>> On Tuesday, 26 August 2014 16:04:59 UTC-7, Michael DeHaan wrote:
>>>
>>>> Did you want to reference that variable in a template somewhere?
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Aug 26, 2014 at 6:26 PM, Brian Coca <[email protected]> wrote:
>>>>
>>>>> Not sure what you mean. When set at play level, all tasks by default
>>>>> will use that remote_user. you can override on specific tasks with
>>>>> different remote_user.​ Of course unless hostvars override with
>>>>> ansible_ssh_user
>>>>>
>>>>> --
>>>>> 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/CADn%2BHsyZW0DzZj6e_98c%2BKcrq93ozz3a9ex
>>>>> %2Bk%2Binc%2BMXz6s0%2BA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/ansible-project/CADn%2BHsyZW0DzZj6e_98c%2BKcrq93ozz3a9ex%2Bk%2Binc%2BMXz6s0%2BA%40mail.gmail.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 [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/2efe7be0-435f-406b-bab6-
>>> cebb7a5ec489%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/2efe7be0-435f-406b-bab6-cebb7a5ec489%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 [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/d95ef348-b9fc-4c40-b523-67a23975b1c8%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/d95ef348-b9fc-4c40-b523-67a23975b1c8%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 [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/CA%2BnsWgz9q3hqmvre2u9j4tpw_RA_gwbVxym38s_B2cZc5K5pbA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to