Last active
February 23, 2016 15:53
-
-
Save chicagobuss/497c11ba8ab26e0a96e2 to your computer and use it in GitHub Desktop.
parallelized gce launch role
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# file: roles/launch/tasks/main.yml | |
- name: Launch instances | |
local_action: gce instance_names={{ names }} machine_type={{ type }} | |
image={{ image }} network={{ network }} tags={{ tags }} | |
register: gce_instances | |
async: 7200 | |
poll: 0 | |
- name: Wait for instance creation to complete | |
async_status: jid={{ item.ansible_job_id }} | |
register: gce_jobs | |
until: gce_jobs.finished | |
retries: 300 | |
with_items: gce_instances.results | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment