This command works flawlessly:
> ssh -C -tt -o Port=22 -o IdentityFile="private_key" -o
KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10
10.0.0.223 /bin/sh -c \"'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1430169813.23-125023645540075 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1430169813.23-125023645540075 && echo
$HOME/.ansible/tmp/ansible-tmp-1430169813.23-125023645540075'\"
I have just added escaped double quotes (\") around the shell commands.
Does Ansible not generate these correctly?
Having just the following as output makes it hard to tell:
> ansible testserver -m ping -vvvv
<10.0.0.223> ESTABLISH CONNECTION FOR USER: vagrant
<10.0.0.223> REMOTE_MODULE ping
<10.0.0.223> EXEC ssh -C -tt -vvv -o Port=22 -o IdentityFile="private_key"
-o KbdInteractiveAuthentication=no -o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=vagrant -o ConnectTimeout=10
10.0.0.223 /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1430169948.75-172225397896204 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1430169948.75-172225397896204 && echo
$HOME/.ansible/tmp/ansible-tmp-1430169948.75-172225397896204'
testserver | FAILED => SSH Error: debug1: Calling cleanup 0x8078582(0x0)
while connecting to 10.0.0.223:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH
debug output to help diagnose the issue.
On Monday, April 27, 2015 at 10:34:00 PM UTC+2, dusank wrote:
>
> mdir with the -p argument works fine on Solaris, running the commands
> directly yields this:
>
> > mkdir -p $HOME/.ansible/tmp/ansible-tmp-1430162748.4-36817797133771 &&
> chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1430162748.4-36817797133771 &&
> echo $HOME/.ansible/tmp/ansible-tmp-1430162748.4-36817797133771
> /home/savant/.ansible/tmp/ansible-tmp-1430162748.4-36817797133771
>
> On Monday, April 27, 2015 at 9:27:24 PM UTC+2, Brian Coca wrote:
>>
>> From the ssh debug it seems you are not feeding the client a valid key
>> file, but still your default rsa key seems to work instead.
>>
>> Still, that is all irrelevant as what is failing is the mkdir command,
>> but last i checked -p was supported on Solaris.
>>
>>
>>
>> --
>> Brian Coca
>>
>
--
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/19af6ee4-5d02-4f15-9399-bcdca9540a43%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.