path-archived

Example:

# Archive a folder.
- path-archived:
    path: /tmp/folder_to_archive/*
    mode: '0700'
    owner: freckles
    dest: /tmp/archive.tar.gz

Description

n/a

Resources

Variables

Name Type Default Description

dest

string --

The file name of the destination archive. Required

path

string --

Remote absolute path or glob of the file or files to compress or archive. Required

become

boolean False

Whether to use root permissions to archive the path.

exclude_path

string --

Path or glob to exclude from the archive.

format

string gz

The type of compression to use.

group

string --

The group of the archive file.

mode

string --

The permissions of the archive file.

owner

string --

The owner of the archive file.

parent_dir_mode

string --

The permissions of the archive parent directory.

Examples

Example 1

Archive a folder.

Code
- path-archived:
    path: /tmp/folder_to_archive/*
    mode: '0700'
    owner: freckles
    dest: /tmp/archive.tar.gz
Description

Archive the contents of folder '/tmp/folder_to_archive' into the archive '/tmp/archive.tar.gz'. Set the archive file mode to '0700' and its owner (which will be created if it doesn't exist yet) to 'freckles'.

Command-line

frecklecute path-archived --help

Usage: frecklecute path-archived [OPTIONS]

  Archives a file or folder.

Options:
  --dest DEST                  The file name of the destination archive.
                               [required]
  --path PATH                  Remote absolute path or glob of the file or
                               files to compress or archive.  [required]
  --become / --no-become       Whether to use root permissions to archive the
                               path.
  --exclude-path EXCLUDE_PATH  Path or glob to exclude from the archive.
  --format FORMAT              The type of compression to use.  [default: gz]
  --group GROUP                The group of the archive file.
  --mode MODE                  The permissions of the archive file.
  --owner USER                 The owner of the archive file.
  --parent-dir-mode MODE       The permissions of the archive parent
                               directory.
  --help                       Show this message and exit.