Skip to content

Instantly share code, notes, and snippets.

@sldenazis
Last active January 23, 2018 19:08
Show Gist options
  • Save sldenazis/ebefac9afd0a33748e6f43208f260fdb to your computer and use it in GitHub Desktop.
Save sldenazis/ebefac9afd0a33748e6f43208f260fdb to your computer and use it in GitHub Desktop.
---
- hosts: all
become: yes
vars:
remote_path: /etc/grafana
local_path: ./
tasks:
- name: Get directory content
find:
paths: "{{ remote_path }}"
file_type: file
recurse: yes
register: find_result
- name: Fetch files
fetch:
src: "{{ item.path }}"
dest: "{{ local_path }}"
with_items: "{{ find_result.files }}"
# vim: ts=2 et syntax=ansible:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment