# Same role - parts run on different servers

**URL:** <https://forum.ansible.com/t/same-role-parts-run-on-different-servers/26240>\
**Category:** Ansible Project\
**Created:** [December 10, 2017, 12:51pm UTC](https://forum.ansible.com/t/same-role-parts-run-on-different-servers/26240 "2017-12-10T12:51:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shlomit\_Afgin](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@Shlomit\_Afgin](https://forum.ansible.com/u/Shlomit_Afgin)\
**Post date:** [December 10, 2017, 12:51pm UTC](https://forum.ansible.com/t/same-role-parts-run-on-different-servers/26240/1 "2017-12-10T12:51:03Z")

</div>

Hi,  
I need to add new user to server1 and create his home directory on server2.  
Do I must run those part in separate Ansible roles or it can be in the same role and I can tell on which server run which part of the role?  
Thanks.

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [December 10, 2017, 2:13pm UTC](https://forum.ansible.com/t/same-role-parts-run-on-different-servers/26240/2 "2017-12-10T14:13:49Z")

</div>

It can be in the same role, just use delegate\_to on task(s) to run it on another host  
[https://docs.ansible.com/ansible/latest/playbooks\_delegation.html#delegation](https://docs.ansible.com/ansible/latest/playbooks_delegation.html#delegation)
