Created
October 3, 2016 15:16
-
-
Save lanky/e3c3d5751c6b33388e343ef72de5217e to your computer and use it in GitHub Desktop.
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
| --- | |
| # vim: set ft=ansible: | |
| - name: subelements | |
| hosts: localhost | |
| gather_facts: no | |
| vars: | |
| static_hosts: | |
| - host: test1 | |
| ips: | |
| - 192.168.0.1 | |
| - 192.168.0.2 | |
| - 192.168.0.3 | |
| - host: test2 | |
| ips: | |
| - 127.0.0.1 | |
| - 127.0.1.1 | |
| - 127.1.0.1 | |
| tasks: | |
| - name: iterthingies | |
| debug: | |
| msg: "{{ item.0.host }} = {{ item.1 }}" | |
| with_subelements: | |
| - static_hosts | |
| - ips |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment