# Error when i use shell: ./mon\_script

**URL:** <https://forum.ansible.com/t/error-when-i-use-shell-mon-script/30562>\
**Category:** Ansible Project\
**Created:** [June 13, 2019, 2:39pm UTC](https://forum.ansible.com/t/error-when-i-use-shell-mon-script/30562 "2019-06-13T14:39:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryad9200000](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@ryad9200000](https://forum.ansible.com/u/ryad9200000)\
**Post date:** [June 13, 2019, 2:39pm UTC](https://forum.ansible.com/t/error-when-i-use-shell-mon-script/30562/1 "2019-06-13T14:39:03Z")

</div>

Hi,

I have one script deployment.sh, when i play this next task, i have one message error :

- name: “Execut script deployment.sh”  
shell: ./deployment.sh  
delegate\_to: localhost

The next is message error :

failed: [my\_host → localhost] =\> {“changed”: true, “cmd”: “./deployment.sh”, “delta”: “0:00:04.317850”, “end”: “2019-06-13 16:32:22.757213”, “rc”: 1, “start”: “2019-06-13 16:32:18.439363”}  
stderr: Traceback (most recent call last):  
File “/mssql-cli/lib/python3.6/runpy.py”, line 193, in \_run\_module\_as\_main  
“ **main** ”, mod\_spec)  
File “/mssql-cli/lib/python3.6/runpy.py”, line 85, in \_run\_code  
exec(code, run\_globals)  
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 101, in   
main()  
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 94, in main  
run\_cli\_with(mssqlcli\_options)  
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/main.py”, line 56, in run\_cli\_with  
mssqlcli.run()  
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/mssql\_cli.py”, line 367, in run  
self.cli = self.\_build\_cli(history)  
File “/mssql-cli/lib/python3.6/site-packages/mssqlcli/mssql\_cli.py”, line 471, in \_build\_cli  
eventloop=self.eventloop)  
File “/mssql-cli/lib/python3.6/site-packages/prompt\_toolkit/interface.py”, line 80, in **init**  
self.output = output or create\_output()  
File “/mssql-cli/lib/python3.6/site-packages/prompt\_toolkit/shortcuts.py”, line 126, in create\_output  
ansi\_colors\_only=ansi\_colors\_only, term=term)  
File “/mssql-cli/lib/python3.6/site-packages/prompt\_toolkit/terminal/vt100\_output.py”, line 424, in from\_pty  
assert stdout.isatty()  
AssertionError

FATAL: all hosts have already failed – aborting

Someone have idea please why i have this message error ?

Thanks for your help community Ansible !!! 🙂

Regards,

---

<div class="post-metadata">

**Author:** ![shivharsh.nec](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@shivharsh.nec](https://forum.ansible.com/u/shivharsh.nec)\
**Post date:** [June 17, 2019, 11:40am UTC](https://forum.ansible.com/t/error-when-i-use-shell-mon-script/30562/2 "2019-06-17T11:40:28Z")

</div>

Hi Ryad,

I have not been able to reproduce the issue with the information provided in your query. My playbook executed absolutely fine on Ansible v 2.7.10

`
