September 2018
Beginner to intermediate
214 pages
5h 53m
English
This is the module that reverses the previous module function. This module helps gather files from the remote hosts and stores them in the Ansible master machine. It can be handy when collecting apps and service logs, user configurations, or system related files. As an example, we will try to collect some files from each host and organize them in the master Ansible host:
- name: Collect user files from remote hosts fetch: src: /home/user1/.profile dest: /home/alibi/user1-profile-{{ inventory_hostname }} flat: yes
This module is also supported when managing remote Windows hosts. It has a checksum validation process that can be deactivated for faster transfer at your own risk.
Read now
Unlock full access