Skip to content

fetch

!fetch

Category: files

Retrieve a file from the target to the control machine (the inverse of copy). dest is optional; content is also exposed via the run result.

Parameters

NameTypeRequiredDescription
srcpathyesRemote path to fetch (must exist).
destpathnoLocal destination path. If omitted, content is captured via the run result.

Examples

- !fetch
  src: /var/lib/app/initial_password.txt
  dest: /tmp/app-password.txt