On Tuesday, May 8, 2012 at 8:28 PM, Elizabeth Marston wrote:
The only suggestion I would have is in the post I made a few minutes ago. I would like (in 0.6 or whenever) for Ansible to offer a quick/dirty https server on some arbitrary port on the overlord instance, and then use a randomized secret to download files to the target from the overlord, say from the ~packages directory. While the current 'copy' action is nice and all, https is faster than sftp and besides there are many command line utilities that want/expect/can handle an http(s) url. Because we can pass secrets via ssh between the overlord and target instances, security would not be significantly affected. We could use Tornado to serve a default directory we could call, say, $ANSIBLE_HOME/packages or (more generally) $ANSIBLE_HOME/downloads.
On Tuesday, May 8, 2012 at 9:35 PM, Elizabeth Marston wrote:
By 'daemon' you mean 'a process that forks off and runs in the background', right? Because that's not what I had in mind -- just a small one-line non-blocking HTTP server that begins listening when ansible begins executing a playbook, and stops when ansible stops, and only accepts encrypted connections from ansible clients. That seems very useful to me, and it's not a solution that you could arrive at just by mixing and matching preexisting transfer tools (which, as you pointed out, typically are daemons and thus create an additional attack surface). You wouldn't even need to fork at all, green threads are good enough, by GIL's beard!
On Wednesday, May 9, 2012 at 11:12 AM, John Kleint wrote:
I could be wrong about where connections are being closed, but I'mpretty sure I took out the connection closing stuff from the sudocode, and it still works. ;) It looks like a new SSH connection iscreated for each task, but it seems this is more because each taskmakes a new Runner which makes a new Connection, rather than anybodyclosing the old one. Perhaps we could re-use Connections.
Another optimization opportunity would be to have Connection just openan SFTP channel once and then re-use that for multiple files.
Would a file server thread really buy us much? If you have staticfiles to copy to many nodes, you would get better performance settingup a dedicated web server. If you need to template files, I'd guessyou're CPU limited by the overlord anyway.