# ansible delegate\_to behaving absurd when used inside a loop

**URL:** <https://forum.ansible.com/t/ansible-delegate-to-behaving-absurd-when-used-inside-a-loop/33753>\
**Category:** Ansible Project\
**Created:** [September 7, 2020, 4:04am UTC](https://forum.ansible.com/t/ansible-delegate-to-behaving-absurd-when-used-inside-a-loop/33753 "2020-09-07T04:04:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shifa\_Shaikh](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@Shifa\_Shaikh](https://forum.ansible.com/u/Shifa_Shaikh)\
**Post date:** [September 7, 2020, 4:04am UTC](https://forum.ansible.com/t/ansible-delegate-to-behaving-absurd-when-used-inside-a-loop/33753/1 "2020-09-07T04:04:38Z")

</div>

Sharing my testcase below demonstrating the problem that one can replicate:

I have ssh connectivity from ansible host to JUMP Servers with root user as below:

anuser1@ANSIBLE\_HOST# ssh [root@10.0.0.1](mailto:root@10.0.0.1) ----------\> success anuser1@ANSIBLE\_HOST# ssh [root@10.0.0.2](mailto:root@10.0.0.2) ----------\> success

Below is the command i use to execute my playbook:

ansible-playbook /app/playbook/injectkey/injectkey.yml -e JUMP\_SERVER=‘10.0.0.1\n10.0.0.2’ -e TARGET\_SERVER=‘192.0.0.99’ -e TARGET\_USER=‘root’ -vvv

Below is my playbook injectkey.yml:
