Last active
April 24, 2019 17:47
-
-
Save kylejeske/2b586e31c0b31607e3780803213d5844 to your computer and use it in GitHub Desktop.
Ansible Reference Items by Index Position
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
hosts: all | |
vars: | |
file_path_1: /usr/bin | |
file_path_2: /example | |
file_path_3: /opt | |
tasks: | |
- name: example task | |
file: | |
path: "{{ item.0 }}/{{ item.1 }}" | |
state: present | |
with items: | |
- [ "{{ file_path_1 }}/{{ file_path_2 }}" | |
- [ "{{ file_path_3 }}/{{ file_path_2 }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment