Last active
November 21, 2018 02:37
-
-
Save cognifloyd/422ccc65eac6c62f75d2d76729059ae5 to your computer and use it in GitHub Desktop.
Example of a surprising way to use 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: a loop that surprised me | |
stat: "{{ item }}" | |
loop: | |
- path: /some/file/path | |
- path: /another/file/path | |
- name: a loop the way I normally do it (maybe not for stat, but for modules with multiple paramaters) | |
stat: | |
path: "{{ item.path }}" | |
loop: | |
- path: /some/file/path | |
- path: /another/file/path | |
- name: a pattern I often use with something this simple | |
stat: | |
path: "{{ item }}" | |
loop: | |
- /some/file/path | |
- /another/file/path | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment