# Inventory groups with same hosts but differnts ansible\_ssh\_user

**URL:** <https://forum.ansible.com/t/inventory-groups-with-same-hosts-but-differnts-ansible-ssh-user/14798>\
**Category:** Ansible Project\
**Created:** [March 18, 2014, 8:55am UTC](https://forum.ansible.com/t/inventory-groups-with-same-hosts-but-differnts-ansible-ssh-user/14798 "2014-03-18T08:55:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Herve\_Leclerc](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Herve\_Leclerc](https://forum.ansible.com/u/Herve_Leclerc)\
**Post date:** [March 18, 2014, 8:55am UTC](https://forum.ansible.com/t/inventory-groups-with-same-hosts-but-differnts-ansible-ssh-user/14798/1 "2014-03-18T08:55:19Z")

</div>

hello,  
Here is a sample inventory that i want to use

[paadadm]  
**machine1** ansible\_ssh\_user= **admin** comment=“Sandbox Admin Node”

[paadsrvwbsa]  
**machine1** ansible\_ssh\_user= **doe** comment=“Sandbox Node A”

[paadsrvwbsb]  
**machine2** ansible\_ssh\_user= **anotherone** comment=“Sandbox Node B”

[paadstack:children]  
paadadm  
paadsrvwbsa  
paadsrvwbsb

if i use this sample playbook

---

<div class="post-metadata">

**Author:** ![Herve\_Leclerc](https://avatars.discourse-cdn.com/v4/letter/h/a8b319/32.png) [@Herve\_Leclerc](https://forum.ansible.com/u/Herve_Leclerc)\
**Post date:** [March 18, 2014, 9:01am UTC](https://forum.ansible.com/t/inventory-groups-with-same-hosts-but-differnts-ansible-ssh-user/14798/2 "2014-03-18T09:01:13Z")

</div>

Finally i’ve found the solution (thx to raphael) : make an inventory alias

[paadsrvwbsa]  
**machine1\_alias ansible\_ssh\_host=machine1** ansible\_ssh\_user= **doe** comment=“Sandbox Node A”
