Created
August 26, 2015 15:45
-
-
Save halberom/96a2f8e630235ec91fce to your computer and use it in GitHub Desktop.
ansible - example of using a fact in a with_items 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
--- | |
- hosts: localhost | |
tasks: | |
- debug: msg="{{ item.src }} and {{ item.dest }}" | |
with_items: | |
- { src: "{{ ansible_hostname }}", dest: /tmp/foo } | |
- { src: "{{ ansible_os_family }}", dest: /tmp/bar } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment