# Different user by host

**URL:** <https://forum.ansible.com/t/different-user-by-host/11608>\
**Category:** Ansible Project\
**Created:** [June 11, 2012, 12:27pm UTC](https://forum.ansible.com/t/different-user-by-host/11608 "2012-06-11T12:27:07Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [January 28, 2013, 1:42am UTC](https://forum.ansible.com/t/different-user-by-host/11608/21 "2013-01-28T01:42:29Z")

</div>

> What I have working now suits my purposes, and if there is community  
> interest, I would submit a patch along these lines, also incorporating  
> further comments you may have.

I appreciate your work and use case, though I do not currently think  
this is something I want (another SSH connection plugin) in core.

Thankfully, the connection plugins are \*very\* tiny, and it's pluggable  
for exactly this reason.

The connections don't change very often, so you should not have any  
trouble at all with this approach.

Now, this is a ginormously long thread, so I'm not really sure what  
it's about anymore, and responses are also long.

If it turns out we can't set ansible\_ssh\_user via inventory variables  
and make it actually /use/ that username, I believe that is something  
we need to fix.

---

<div class="post-metadata">

**Author:** ![Robert\_Vernon\_Philli](https://avatars.discourse-cdn.com/v4/letter/r/57b2e6/32.png) [@Robert\_Vernon\_Philli](https://forum.ansible.com/u/Robert_Vernon_Philli)\
**Post date:** [January 29, 2013, 4:29pm UTC](https://forum.ansible.com/t/different-user-by-host/11608/22 "2013-01-29T16:29:02Z")

</div>

Sounds good to me. Support of the ansible\_ssh\_user host variable would  
be a fine solution. If I develop code using that approach, I’ll post in a new thread.

Thank you for sharing your analysis and advice.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [February 4, 2013, 4:01pm UTC](https://forum.ansible.com/t/different-user-by-host/11608/23 "2013-02-04T16:01:10Z")

</div>

Long thread, but we're going to re-look at making ansible\_ssh\_user as  
a variable settable in 1.1.

There was some confusion with a patch for it later, but it needed to  
be tweaked some anyway.

Hopefully reasonably soon.

--Michael

[Previous page](https://forum.ansible.com/t/different-user-by-host/11608.md?page=1)
