client_system | FAILED => Traceback (most recent call last):
File "/ansible/ansible/lib/ansible/runner.py", line 534, in _executor
(host, ok, data, err) = self._executor_internal(host)
File "/ansible/ansible/lib/ansible/runner.py", line 573, in _executor_internal
result = self._execute_normal_module(conn, host, tmp, module_name)
File "/ansible/ansible/lib/ansible/runner.py", line 346, in
_execute_normal_module
module = self._transfer_module(conn, tmp, module_name)
File "/ansible/ansible/lib/ansible/runner.py", line 197, in _transfer_module
outpath = self._copy_module(conn, tmp, module)
File "/ansible/ansible/lib/ansible/runner.py", line 643, in _copy_module
conn.put_file(in_path, out_path)
File "/ansible/ansible/lib/ansible/connection.py", line 161, in put_file
sftp = self.ssh.open_sftp()
File "/usr/lib/python2.6/site-packages/paramiko/client.py", line
399, in open_sftp
return self._transport.open_sftp_client()
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line
828, in open_sftp_client
return SFTPClient.from_transport(self)
File "/usr/lib/python2.6/site-packages/paramiko/sftp_client.py",
line 105, in from_transport
chan.invoke_subsystem('sftp')
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line
240, in invoke_subsystem
self._wait_for_event()
File "/usr/lib/python2.6/site-packages/paramiko/channel.py", line
1084, in _wait_for_event
raise e
SSHException: Channel closed.
The other thing I ran across is that I seem to need to be running an
ssh-agent even if I'm using passwordless keys... if I'm not using an
agent, I get the following:
client_system | FAILED => FAILED: Private key file is encrypted
Is that expected? I guess maybe paramiko is expecting to find an
agent with a set of keys added that it can try for authentication? It
would be nice if I could specify a static key to use somehow (i.e.
/root/.ssh/ansible) and have paramiko connect with that instead of
requiring an agent...
thanks!
matt
On Wednesday, April 25, 2012 at 8:47 AM, Rodney Quillo wrote:
Hi Erno,playbook I think has set the user primarily to root(if user is not setinside the playbook yml file)without first checking the content of ~/.ssh/config.
I've tested it and somehow this might be a new feature/bug..Hmm.. welldepends on how maintainers see it.:)Can you please file it to github issues?
I agree sourcing an ssh config may not be the long term way to do it,
but we want to be able to control various parameters around ssh
behavior, right? In my case, I need a way to have ansible connect to
sshd on a port other than 22. I don't think that sourcing a user's
default ssh config is necessarily appropriate for configuration
management... I have an ssh config that I use which that I _don't_
want ansible using, so for my requirements I've hacked the feature to
read the static file /etc/ansible/ssh_config. Maybe that's an ok
short-term solution to support this flexibility without unintended
consequences to people who don't want it?
One nice thing about the ssh_config implementation is that it can set
global and host-specific behavior in a standard way that everyone
already knows. In Ansible, we have the hosts file, but I don't think
ssh settings really fit into that model, and I don't think there is
currently support for global settings there either (I may be wrong?).
Maybe a larger question here is how to flexibly override Ansible's
default behavior...
matt
YAML host file already does this.
ansible_ssh_port variable
or in the INI format file
host:port
I don't think that sourcing a user's
> default ssh config is necessarily appropriate for configuration
> management... I have an ssh config that I use which that I _don't_
> want ansible using, so for my requirements I've hacked the feature to
> read the static file /etc/ansible/ssh_config. Maybe that's an ok
> short-term solution to support this flexibility without unintended
> consequences to people who don't want it?
Sounds confusing to me.
I'd rather rip the SSH config file stuff out and make things use
Ansible's own host file.
>
> One nice thing about the ssh_config implementation is that it can set
> global and host-specific behavior in a standard way that everyone
> already knows.
Not everyone :) I definitely don't want it to be the only way and if
it overrides things configured in Ansible
that would be confusing.
In Ansible, we have the hosts file, but I don't think
> ssh settings really fit into that model, and I don't think there is
> currently support for global settings there either (I may be wrong?).
> Maybe a larger question here is how to flexibly override Ansible's
> default behavior...
It supports groups though, which is a pretty nice way to assign things.
Override how?
>
> matt
On Friday, April 27, 2012 at 12:42 AM, Erno Aapa wrote:
Ok, I cannot say anything to those technical stuff because I'm not so familiar with Ansible.... yet :).But I just want to point out that I think many users in future will expect that config in .ssh/config works when use Ansible, or thats what I did :)
People have old servers and have already setup ssh to use specific user, key file, and already have public key in target server. It would be super fast start to use Ansible, if user don't need to do any other than add host to ansible_host file. I think step to test and start using Ansible would be super small. And thats one key feature for Ansible because user don't need any agent installation etc. just ssh access.Definatelly this same configuration should be available by Ansible host/config file so Ansible is not depended to ssh config.Just remind that users might have different ssh keys, different user, different password to each host.