Yes, I am positive.  From the control machine, I am able to do ssh 
<somehost> "test.sh" with the expected result of hi.

For some reason, when ansible calls a shell script that executes remote ssh 
commands, the script is not returning.

On Saturday, November 25, 2017 at 11:56:07 PM UTC-5, 6MT wrote:
>
> Hi all,
>
> I have a script on a remote machine that ssh's into other machines to do 
> stuff.
>
> On the control machine, if I use the command or shell module to execute 
> the script, everything works fine if the script is as simple as:
>
> #!/bin/sh
>
> echo "hi"
>
> When the playbook is run, I get "hi" in stdout as expected.
>
> However, when I change the script to:
>
> #!/bin/sh
>
> ssh somehost "echo hi"
>
> Ansible hangs indefinitely.  If I put things in the background, e.g. nohup 
> ssh somehost "echo hi" &, I get no output period.  
>
> I've tried all sorts of redirecting stdin/stdout, etc and cannot seem to 
> get this to work.
>
> Has anyone run across this?  Your help is much appreciated.
>
> Thanks
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/92f16fe4-f233-4bae-8974-8a4737789aa0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to