If you want to use Ansible's "Runner" class from an API perspective from Java code, I can kind of see that. Is that the reason?
I think the answer here is start trying to see what it looks like and keep us abreast of what you find out. Maybe create a fork of Ansible on github and make a "ansible-jython" branch or something.
We're not using a lot of binary modules (any?) so I suspect most of it would work to be imported from Jython, but am interested in what other things you may find along the way.
Any findings so far?
--Michael
My final goal is to execute playbooks from java env.
One of the challenges will be to replace paramiko with jaramiko, but I didn’t get to that step yet.
Currently I’m building the most recent snapshot of jython which supports “operations.methodcaller” which is being used by optparse.
I’ll fork ansible and will do all the development on a new branch.
–Konstantin
You could possibly use the ssh connection type which just executes openssh. (-c ssh)
Not sure what the Pythonic way to say "if this is running in Jython" is, but if possible, that kind of conditional import would be acceptable though.
--Michael