# "module\_stderr": "Shared connection to host closed

**URL:** <https://forum.ansible.com/t/module-stderr-shared-connection-to-host-closed/33690>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [August 27, 2020, 8:51pm UTC](https://forum.ansible.com/t/module-stderr-shared-connection-to-host-closed/33690 "2020-08-27T20:51:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![callmeshawn](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@callmeshawn](https://forum.ansible.com/u/callmeshawn)\
**Post date:** [August 27, 2020, 8:51pm UTC](https://forum.ansible.com/t/module-stderr-shared-connection-to-host-closed/33690/1 "2020-08-27T20:51:36Z")

</div>

Hello,

I’ve got Ansible 2.9 installed on RHEL7.8 trying to run a playbook against a host running RHEL6.7.

If I run the playbook as root, all is well.

When I try to connect as a non-privileged account, things fall apart.

If I run the playbook at another account, using become to perform actions requiring privilege escalation, things fail when the task to gather facts executes.

The exact error looks like:

host | FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “Shared connection to host closed.\r\n”,  
“module\_stdout”: “\r\n”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 1  
}

Again, still running as my non-privileged user:  
If I run: ansible all -m setup -i inventory, things work as expected.  
If I run: ansible all -m setup -i inventory --become -K, I get the same error.

My target is running RHEL 6.7, with Python 2.6.6.  
My control node is RHEL 7.8 with Python 2.7.5. Ansible 2.9.10.

I’ve tried enabling pipelining in my ansible.cfg and specifying the interpreter as /usr/bin/python, but neither of those helps.

Thanks,

Shawn

---

<div class="post-metadata">

**Author:** ![callmeshawn](https://avatars.discourse-cdn.com/v4/letter/c/cab0a1/32.png) [@callmeshawn](https://forum.ansible.com/u/callmeshawn)\
**Post date:** [August 27, 2020, 11:27pm UTC](https://forum.ansible.com/t/module-stderr-shared-connection-to-host-closed/33690/2 "2020-08-27T23:27:59Z")

</div>

Problem solved.  
I added /bin/sh to my list of commands in my sudoers file and things started working.

Is that expected/documented somewhere?

Thanks,

Shawn
