Skip to content

Instantly share code, notes, and snippets.

@halberom
Created August 26, 2015 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halberom/96a2f8e630235ec91fce to your computer and use it in GitHub Desktop.
Save halberom/96a2f8e630235ec91fce to your computer and use it in GitHub Desktop.
ansible - example of using a fact in a with_items loop
---
- 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