# Ansible user create and test ssh connectivity

**URL:** <https://forum.ansible.com/t/ansible-user-create-and-test-ssh-connectivity/34041>\
**Category:** Ansible Project\
**Created:** [October 15, 2020, 5:23pm UTC](https://forum.ansible.com/t/ansible-user-create-and-test-ssh-connectivity/34041 "2020-10-15T17:23:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harshal\_Unhale](https://avatars.discourse-cdn.com/v4/letter/h/85e7bf/32.png) [@Harshal\_Unhale](https://forum.ansible.com/u/Harshal_Unhale)\
**Post date:** [October 15, 2020, 5:23pm UTC](https://forum.ansible.com/t/ansible-user-create-and-test-ssh-connectivity/34041/1 "2020-10-15T17:23:20Z")

</div>

My playbook:

---

<div class="post-metadata">

**Author:** ![Charles\_Shaw](https://avatars.discourse-cdn.com/v4/letter/c/77aa72/32.png) [@Charles\_Shaw](https://forum.ansible.com/u/Charles_Shaw)\
**Post date:** [October 16, 2020, 1:34am UTC](https://forum.ansible.com/t/ansible-user-create-and-test-ssh-connectivity/34041/2 "2020-10-16T01:34:18Z")

</div>

Hi there,

My understanding is that when ansible makes a connection to the remote machine it it’ll make the connection as ‘ansible\_user’, and doesn’t re-evaluate it for the play. I’ve split it into two plays, I think it does what you want. Sorry for the formatting 🙂

Running the playbook with -vvv shows the first play connecting as my default user (ansible) and the second play connects as user boblah.

Ansible 2.9
