# module hangs at "getting output with communicate()"

**URL:** <https://forum.ansible.com/t/module-hangs-at-getting-output-with-communicate/29052>\
**Category:** Ansible Developer\
**Created:** [November 16, 2018, 3:30pm UTC](https://forum.ansible.com/t/module-hangs-at-getting-output-with-communicate/29052 "2018-11-16T15:30:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian.tremel](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Post date:** [November 16, 2018, 3:30pm UTC](https://forum.ansible.com/t/module-hangs-at-getting-output-with-communicate/29052/1 "2018-11-16T15:30:09Z")

</div>

while trying to get a new module for editing aix config files running the following occurs. at first run the entries gets successfully added to the file, but at the second run (check mode ?) the module hangs with the mentioned error.  
not sure how to proceed here?

f

repo with actual code →

[https://github.com/flynn1973/ansible\_aix\_stanza](https://github.com/flynn1973/ansible_aix_stanza)

ANSIBLE\_DEBUG = 1

`  
Using module file /usr/lib/python2.7/site-packages/ansible/modules/files/aix\_stanza.py  
18686 1542381145.28827: transferring module to remote /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py  
\<127.0.0.1\> PUT /root/.ansible/tmp/ansible-local-18580WZQLvb/tmpBisKTQ TO /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py  
18686 1542381145.28874: done transferring module to remote  
18686 1542381145.28890: \_low\_level\_execute\_command(): starting  
18686 1542381145.28895: \_low\_level\_execute\_command(): executing: /bin/sh -c ‘chmod u+x /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/ /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py && sleep 0’  
18686 1542381145.28900: in local.exec\_command()  
\<127.0.0.1\> EXEC /bin/sh -c ‘chmod u+x /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/ /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py && sleep 0’  
18686 1542381145.28907: opening command with Popen()  
18686 1542381145.29230: done running command with Popen()  
18686 1542381145.29261: getting output with communicate()  
18686 1542381145.29711: done communicating  
18686 1542381145.29720: done with local.exec\_command()  
18686 1542381145.29739: \_low\_level\_execute\_command() done: rc=0, stdout=, stderr=  
18686 1542381145.29749: \_low\_level\_execute\_command(): starting  
18686 1542381145.29761: \_low\_level\_execute\_command(): executing: /bin/sh -c ‘/usr/bin/python2 /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py && sleep 0’  
18686 1542381145.29770: in local.exec\_command()  
\<127.0.0.1\> EXEC /bin/sh -c ‘/usr/bin/python2 /root/.ansible/tmp/ansible-tmp-1542381145.04-246550469721570/aix\_stanza.py && sleep 0’  
18686 1542381145.29780: opening command with Popen()  
18686 1542381145.30060: done running command with Popen()  
18686 1542381145.30082: getting output with communicate()

`

file with added values:

`

fideloper22:  
bla = blaa  
SYSTEM = LDAP  
registry = LDAP

fideloper23:  
bla = blaa  
SYSTEM = LDAP  
registry = LDAP

fideloper24:  
bla = blaa  
SYSTEM = LDAP  
registry = LDAP

`
