Last active
January 23, 2018 19:08
-
-
Save sldenazis/ebefac9afd0a33748e6f43208f260fdb to your computer and use it in GitHub Desktop.
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: 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