Created
November 27, 2018 03:31
-
-
Save willthames/0f1402f8ccff822cc4792f7b287ae8fe to your computer and use it in GitHub Desktop.
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
# This is untested, and only really works if number of zones evenly divides number of instances | |
- name: create number_of_instances across a list of zones | |
ec2: | |
desired_count: "{{ number_of_instances / (zones | length) }}" | |
az: "{{ item % (zones | length) }}" | |
loop: "{{ number_of_instances | range }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment