Error when i use shell: ./mon_script

13 views
Skip to first unread message

Ryad karkar

unread,
Jun 13, 2019, 10:39:03 AM6/13/19
to Ansible Project
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 <module>
    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,
Message has been deleted

Shivharsh Singh

unread,
Jun 17, 2019, 7:40:28 AM6/17/19
to Ansible Project
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

---
- hosts: myhost
  gather_facts
: false
  tasks
:
 
- name: "Say Hello query.sh"
    shell
: ./query.sh
    delegate_to
: localhost


Could you please share below information to further analyse the issue?
  • What is the Ansible version  used ?
  • Any changes made to ansible.cfg file?
  • The host inventory file used.
  • The ansible playbook executed.  
Thanks,
Shivharsh
Reply all
Reply to author
Forward
0 new messages