Created
April 9, 2018 18:27
-
-
Save dmsimard/d42cf5b281e6e6839f73756e6ab6b5a4 to your computer and use it in GitHub Desktop.
ara_loop
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
- name: Create many hosts | |
hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Add one host | |
add_host: | |
ansible_connection: local | |
hostname: "{{ item }}" | |
groups: many | |
with_sequence: start=0 end=1024 format=host%02x | |
- name: Gather facts on many hosts | |
hosts: many | |
gather_facts: no | |
tasks: | |
- name: Run the setup module | |
setup: | |
- name: Finished | |
debug: | |
msg: "{{ inventory_hostname }} is finished" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment