Please see:
https://github.com/ansible/ansible/issues/10837
=Dusan
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.
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
yet it retuned an error in your previous output .... try this, in
ansible.cfg set remote_tmp = /tmp and run it again
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.
it does, not sure why this is not your case
Does not seem to change anything …
And should the escaped double quotes not be shown in the ansible testserver -m ping -vvvv
output?
not sure, they might be removed as they get 'transformed for screen output'
Not sure what I could do about this from a user perspective. Still appears to me to look more like a bug in Ansible itself than a mere configuration issue …
Yet I cannot reproduce the bug, across centos, freebsd, ubuntu,
solaris, gentoo, etc. So my guess is some configuration or setup that
is breaking in your case. This is very basic, if it were not working
everyone would be letting us know as this renders ansible unusable.
May be a Schrödinbug then? (http://en.wikipedia.org/wiki/Heisenbug)
Unfortunately your argument works both ways. I have a pretty standard OpenIndiana installation, no esoteric configuration or setup - especially not in regards to ssh, shells or other basic stuff.
If it was indeed caused by my config/setup then other software would most likely be also breaking, but it does not. Everything works just fine except Ansible.
I am running out of ideas what else might be the root cause of this.
I'm puzzled, i just got an openindiana instance up and running, works
fine. The parallel dimensions argument is starting to look less far
fetched now.
Can you try a fresh ansible install? The only thing i can think of
right now is that you have a corrupt copy.
bcoca@erebos:~/work/ansible$ ansible -m ping openindianatest -k
SSH password:
openindianatest | success >> {
"changed": false,
"ping": "pong"
}
bcoca@erebos:~/work/ansible$ ansible -a 'uname -a' openindianatest -k
SSH password:
openindianatest | success | rc=0 >>
SunOS openindiana 5.11 oi_151a8 i86pc i386 i86pc
I’ve already tried that before, but lets give it another try:
savant@vishnu:/tank/ws/vagrant-up-and-running/playbooks$ pfexec pip install ansible
Downloading/unpacking ansible
Downloading ansible-1.9.0.1.tar.gz (916kB): 916kB downloaded
Running setup.py egg_info for package ansible
/tmp/pip_build_root/ansible/setup.py:11: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
except ImportError:
no previously-included directories found matching ‘v2’
no previously-included directories found matching ‘docsite’
no previously-included directories found matching ‘ticket_stubs’
no previously-included directories found matching ‘packaging’
no previously-included directories found matching ‘test’
no previously-included directories found matching ‘hacking’
no previously-included directories found matching ‘lib/ansible/modules/core/.git’
no previously-included directories found matching ‘lib/ansible/modules/extras/.git’
Requirement already satisfied (use --upgrade to upgrade): paramiko in /usr/lib/python2.6/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): jinja2 in /usr/lib/python2.6/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): PyYAML in /usr/lib/python2.6/vendor-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.6/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.6 in /usr/lib/python2.6/site-packages (from ansible)
Requirement already satisfied (use --upgrade to upgrade): ecdsa>=0.11 in /usr/lib/python2.6/site-packages (from paramiko->ansible)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib/python2.6/site-packages (from jinja2->ansible)
Installing collected packages: ansible
Running setup.py install for ansible
changing mode of build/scripts-2.6/ansible from 644 to 755
changing mode of build/scripts-2.6/ansible-playbook from 644 to 755
changing mode of build/scripts-2.6/ansible-pull from 644 to 755
changing mode of build/scripts-2.6/ansible-doc from 644 to 755
changing mode of build/scripts-2.6/ansible-galaxy from 644 to 755
changing mode of build/scripts-2.6/ansible-vault from 644 to 755
no previously-included directories found matching ‘v2’
no previously-included directories found matching ‘docsite’
no previously-included directories found matching ‘ticket_stubs’
no previously-included directories found matching ‘test’
no previously-included directories found matching ‘hacking’
no previously-included directories found matching ‘lib/ansible/modules/core/.git’
no previously-included directories found matching ‘lib/ansible/modules/extras/.git’
changing mode of /usr/bin/ansible to 755
changing mode of /usr/bin/ansible-playbook to 755
changing mode of /usr/bin/ansible-pull to 755
changing mode of /usr/bin/ansible-doc to 755
changing mode of /usr/bin/ansible-galaxy to 755
changing mode of /usr/bin/ansible-vault to 755
Successfully installed ansible
Cleaning up…
savant@vishnu:/tank/ws/vagrant-up-and-running/playbooks$ pfexec pip install ansible --upgrade
Requirement already up-to-date: ansible in /usr/lib/python2.6/site-packages
Requirement already up-to-date: paramiko in /usr/lib/python2.6/site-packages (from ansible)
Requirement already up-to-date: jinja2 in /usr/lib/python2.6/site-packages (from ansible)
Requirement already up-to-date: PyYAML in /usr/lib/python2.6/vendor-packages (from ansible)
Downloading/unpacking setuptools from https://pypi.python.org/packages/source/s/setuptools/setuptools-15.2.tar.gz#md5=a9028a9794fc7ae02320d32e2d7e12ee (from ansible)
Downloading setuptools-15.2.tar.gz (628kB): 628kB downloaded
Running setup.py egg_info for package setuptools
/tmp/pip_build_root/setuptools/setup.py:11: DeprecationWarning: Parameters to load are deprecated. Call .resolve and .require separately.
Requirement already up-to-date: pycrypto>=2.6 in /usr/lib/python2.6/site-packages (from ansible)
Requirement already up-to-date: ecdsa>=0.11 in /usr/lib/python2.6/site-packages (from paramiko->ansible)
Requirement already up-to-date: markupsafe in /usr/lib/python2.6/site-packages (from jinja2->ansible)
Installing collected packages: setuptools
Found existing installation: setuptools 15.1
Uninstalling setuptools:
Successfully uninstalled setuptools
Running setup.py install for setuptools
Installing easy_install script to /usr/bin
Installing easy_install-2.6 script to /usr/bin
Successfully installed setuptools
Cleaning up…
savant@vishnu:/tank/ws/vagrant-up-and-running/playbooks$ 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 /tmp/ansible-tmp-1430211489.13-127219967802014 && chmod a+rx /tmp/ansible-tmp-1430211489.13-127219967802014 && echo /tmp/ansible-tmp-1430211489.13-127219967802014’
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.
In your tests are you running openindiana to openindiana or *Linux to
openindiana or openindiana to *Linux?
-Toshio
Also, what is the shell on the remote side?
shell should be /bin/sh unless ansible.cfg:executable is set, the
default shell for the user should not matter unless they are
restricted from using /bin/sh (which is not default on any of these
platforms).
As descibed here in more detail: https://github.com/ansible/ansible/issues/10837
I am running Ansible from a OpenIndiana managing machine to manage vagrant boxes running Linux.
I did not set ansible.cfg:executable and as can be seen from the displayed ssh commands /bin/sh is called. The boxes dont have /bin/sh restricted in any way I am aware of. They are taken from the links listed here: https://github.com/ansible/ansible/issues/10837 and no additional customization was made.