I am using the following snippet to execute the playbook, this is the only way I can solve the deployment of servers for the first time as the inventory is not present at that time and lot of orchestration is needed to deploy the cluster with several nodes.
“I am using the following snippet to execute the playbook, this is the only way I can solve the deployment of servers for the first time as the inventory is not present at that time and lot of orchestration is needed to deploy the cluster with several nodes.”
an external inventory script seems appropriate for this and will avoid the problem of your trying to use the API directly.
“running one of the playbook with the copying the large 1.5G file is taking excruciatingly 10 minutes.”
This is effectively using scp or sftp, but it sounds like you may be using a different connection type or something due to the way you have invoked ansible, or maybe aren’t loading the configuration.
Hard to say.
Regardless, this is really an API question, so a bit more suited for ansible-devel. More of an FYI for the future.
The primary purpose of the API is to support /usr/bin/ansible-*, so I can’t really provide a lot of debugging help beyond the above.
We do support the REST API in Tower to a much greater extent, though I’d possibly suggest looking through /usr/bin/ansible and ansible-playbook and seeing how they construct things, with an expectation this is related to different connection parameters.