# Ansible Expect module not responding to questions

**URL:** <https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173>\
**Category:** Ansible Project\
**Created:** [December 2, 2018, 4:57pm UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173 "2018-12-02T16:57:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diptajeet\_Khan](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Diptajeet\_Khan](https://forum.ansible.com/u/Diptajeet_Khan)\
**Post date:** [December 2, 2018, 4:57pm UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173/1 "2018-12-02T16:57:03Z")

</div>

Hi,

Having some trouble in responding to questions of expect module in my code. Any help appreciated… Below is the code & traceback.

BR

Code:

---

<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 3, 2018, 6:55pm UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173/2 "2018-12-03T18:55:57Z")

</div>

Your stdout is empty, that means your program have not prompted any text that the expect module could response to, hence the timeout.

---

<div class="post-metadata">

**Author:** ![Diptajeet\_Khan](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Diptajeet\_Khan](https://forum.ansible.com/u/Diptajeet_Khan)\
**Post date:** [December 3, 2018, 11:02pm UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173/3 "2018-12-03T23:02:34Z")

</div>

Thanks Kai!  
Yes was wondering about that but unfortunately the script ‘/root/dadock-installer/assets/bin/configure.sh’ interact when ran manually.

BR

---

<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 4, 2018, 7:46am UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173/4 "2018-12-04T07:46:56Z")

</div>

Might be that the script detect it's not running interactively.  
Since it's a shell script it should be possible to read the code and figure out what it does.

---

<div class="post-metadata">

**Author:** ![Diptajeet\_Khan](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Diptajeet\_Khan](https://forum.ansible.com/u/Diptajeet_Khan)\
**Post date:** [December 4, 2018, 7:51am UTC](https://forum.ansible.com/t/ansible-expect-module-not-responding-to-questions/29173/5 "2018-12-04T07:51:02Z")

</div>

Hi Kai,

I got the same command working via ‘shell’ module & interact via - spawn/expect/send.

Though I am still wondering why pexpect doesn’t do the same when I can see that the script does get triggered from process logs.

BR
