Ansible newbie…
We run a large enterprise web app load balanced over 10 servers in a customer environment (windows servers)The app exposes a set of Webservices to manage config, such as applying new binaries, exporting config as XML etc.
Sometimes we need to update the application, and this is done by uploading a large ZIP (200mb) to each node, and sometimes we need to export the full config from each node.
Both these things can take a short while (30 secs or so)
Previously we had a set of bash scripts we ran to upload/export the zips, but it ran in a linear fashion, so the script running was 10 x the time to perform the function. It could end up taking a while.
We are now looking at Ansible, and ideally, we would want to do these upload or export tasks in parallel to minimise downtime for the client.
We have the uri-module working to call the webservices but not sure on the best way to run the 10 uri tasks in parallel?
I was thinking of calling uri with the async “call and forget, then check later” method, and just call 10 tasks, one for each node?
Something like this (the below example just runs for 2 nodes).
It looks like it might work, but i don’t like having this repetition?
Is there any other way to do this?
`