Created
April 17, 2017 23:53
-
-
Save squamous/b7ae04df6778bf511bbcdfb12fd0448a to your computer and use it in GitHub Desktop.
Parallel ansible execution
This file contains hidden or 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
# http://toroid.org/ansible-parallel-dispatch | |
- name: Set up EC2 instances | |
ec2: | |
... | |
wait: yes | |
with_items: instances | |
register: ec2_instances | |
async: 7200 | |
poll: 0 | |
- name: Wait for instance creation to complete | |
async_status: jid={{ item.ansible_job_id }} | |
register: ec2_jobs | |
until: ec2_jobs.finished | |
retries: 300 | |
with_items: ec2_instances.results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment