I like to use paramiko for these types of things. Of course I don't have all the details but from the info you have provided it seems like you should be able to do this with ansible itself. Regards, Robert