path-is-synced

Example:

# Rsync a folder recursively.
- path-is-synced:
    src: /tmp/source
    dest: /tmp/dest
    delete_on_dest: true

Description

Make sure a file or folder is synced between two locations.

This does also create the remote owner/group if necessary.

For this frecklet, the “local host” is the host the synchronize task originates on, and the “destination host” is the host synchronize is connecting to.

Variables

Name Type Default Description

dest

string --

Path on the target host that will be synchronized to the destination.

Examples: - /tmp/freckles/dest - rsync://dev.frkl.io/tmp/freckles/dest Required

src

string --

Path on the source host that will be synchronized to the destination.

Examples: - /tmp/freckles/src - rsync://dev.frkl.io/tmp/freckles/src Required

become

boolean False

whether to use root permissions to do the download/chown of target

delete_on_dest

boolean False

Whether to delete the files on 'dest' that don't exist on the 'src'.

group

string --

the group of the dest folder/file

mode

string --

The permissions of the folder.

owner

string --

the owner of the dest folder/file

Examples

Example 1

Rsync a folder recursively.

Code
- path-is-synced:
    src: /tmp/source
    dest: /tmp/dest
    delete_on_dest: true
Description

Ensure folder /tmp/source is synced to /tmp/dest. Delete files on /tmp/dest if they don't exist in the source folder.

Command-line

frecklecute path-is-synced --help

Usage: frecklecute path-is-synced [OPTIONS]

  Make sure a file or folder is synced between two locations.

  This does also create the remote owner/group if necessary.

  For this frecklet, the “local host” is the host the synchronize task
  originates on, and the “destination host” is the host synchronize is
  connecting to.

Options:
  --dest PATH                     the host and path of the target  [required]
  --src PATH                      the host and path of the source  [required]
  --become / --no-become          whether to use root permissions to do the
                                  download/chown of target
  --delete-on-dest / --no-delete-on-dest
                                  Whether to delete the files on 'dest' that
                                  don't exist on the 'src'.
  --group GROUP                   the group of the dest folder/file
  --mode MODE                     The permissions of the folder.
  --owner USER                    the owner of the dest folder/file
  --help                          Show this message and exit.