Hi,
I’m trying to use an ansible playbook to run my playbook which gets the “hosts” parameter as part of the ansible-playbook run, example:
" ansible-playbook -v -i deploy/inventory/gcloud-${ENV} --flush-cache -e “hosts=half-pipe-vpaid” deploy/update-half-pipe.yml"
When this playbook runs, it starts the gce.py --list script(which for some reason takes a very long time to produce results, although the server is located in GCP). After the first time it rans, it continues with the playbook as usual, and as soon as he gets to the second instance(host), he start to do the same gce.py --list again. Is there a way to actually store the results of the gce.py --list and pass it as hosts to the ansible-playbook? Is there a reason that it takes that long to run this script?
Thanks in advance!!