back

download

Transfer files and directories from the remote machines to the local client.

Overview

  • This module downloads files from the remote machines

Form

(download options)

Arguments

options

A hashmap of options. All available keys and their values are described below

Options

OptionDescription
:src
required true
type string

    A path to a file or directory on the remote hosts

:dest
required true
type string

    A local path to copy the files into.

    If :recurse is true and :dest path ends in a slash; indicates that destination is a directory and the contents of :src are to be copied into the directory.

    If :recurse is true and :dest path does not end in a slash; indicates that the :src directory is to be copies as the specified path.

:recurse
type boolean

    If the remote path is a directory, recurse through all the files and directories

:preserve
type boolean

    Preserve the remote files' modification flags when copying them to the local filesystem

:dir-mode
type integer

    If :preserve is false, this parameter specifies the file modification mode that created directories on the client will have

:mode
type integer

    If :preserve is false, this parameter specifies the file modification mode that copied files on the client will have

:owner
type string

    If specified the local files and directories will be owned by this user

:group
type string

    If specified the local files and directories will be owned by this group

Examples