Skip to content

Instantly share code, notes, and snippets.

@brk3
Created May 15, 2018 16:30
Show Gist options
  • Save brk3/1c36e4bc34cac0c1d41c1beee14f66fd to your computer and use it in GitHub Desktop.
Save brk3/1c36e4bc34cac0c1d41c1beee14f66fd to your computer and use it in GitHub Desktop.
---
- hosts: all
tasks:
#- debug:
#msg: "{{ item }}"
#with_filetree: /tmp/paul
- file:
path: "/tmp/result/{{ item.path }}"
state: directory
with_filetree: /tmp/paul
when: item.state == 'directory'
- template:
src: "{{ item.src }}"
dest: "/tmp/result/{{ item.path }}"
with_filetree: /tmp/paul
when: item.state == 'file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment