fetch

Collection: builtin

Full Name: parallax.builtin.fetch

Aliases: ansible.builtin.fetch, fetch

Synopsis

Copy files from remote hosts back to the controller

Parameters

NameTypeRequiredDefaultDescription
srcstringyesThe file to fetch from the remote system
deststringyesA directory to save the file into
fail_on_missingbooltrueMakes it fail when the source file is missing
validate_checksumbooltrueVerify that the source and destination checksums match
flatboolfalseAllows you to override the default behavior of appending hostname/path/to/file to the destination

Example

- name: Collect each host's kernel log
  fetch:
    src: /var/log/kern.log
    dest: /tmp/collected/
    flat: false