Transport now abstracted out

As of pushes just now made, the Runner() class takes a transport, the default value is “paramiko”.

This paves the way for other transports (i.e. message bus) if someone wants to add them. I would make another class called MessageBusConnecton copying ParamikoConnection and the constructor would have to read from a config file. EASY!

The imports should also be guarded such that the app still works if dependencies are not found.

If someone does this, we can expose the choice of transport from an environment variable or CLI option or similar.

For those new to the list/project, SSH will be the default always because SSH requires no additional software to be installed on the remote nodes.

However to support other transports all we need are two things … (A) a way to push files, (B) a way to execute commands remotely.

So technically, ansible modules & playbooks can work over anything now.

Who is up for adding sneaker net, telnet, and SNMP? Ok, I kid. But it’s all possible.

You can see from the Paramiko implementation (/lib/ansible/connection.py) how little code there is and how little it knows about how Ansible really works. (No knowledge of JSON, modules, paths, or anything).

–Michael