It should be simple enough to adjust to run ansible.
https://gist.github.com/glenjamin/2d04e9c2a163c7848173