folder-stowed

Example:

# 'stow' a folder
- folder-stowed:
    dirname: subfolder_1
    src: /tmp/source
    target: /tmp/target

Description

Stow a folder.

This uses the stow application to symbolically link a folder (recursively).

If target_owner is set, the destination folder will be changed to be owned by this user (and created with root permissions if it doesn't exist yet), and stow will be executed as that user.

Resources

Variables

Name Type Default Description

dirname

string --

The name of the directory to stow. Required

src

string --

The (parent) source directory to stow from. Required

target

string --

The (parent) target directory to stow into. Required

become

boolean --

Whether to stow using root permissions.

target_owner

string --

The user to who owns the destination folder.

Examples

Example 1

'stow' a folder

Code
- folder-stowed:
    dirname: subfolder_1
    src: /tmp/source
    target: /tmp/target
Description

'stow' child folder subfolder_1 from /tmp/source/ its contents into /tmp/target

Command-line

frecklecute folder-stowed --help

Usage: frecklecute folder-stowed [OPTIONS]

  Stow a folder.

  This uses the [stow](https://www.gnu.org/software/stow/) application to
  symbolically link a folder (recursively).

  If ``target_owner`` is set, the destination folder will be changed to be
  owned by this user (and created with root permissions if it doesn't exist
  yet), and stow will be executed as that user.

Options:
  --dirname DIRNAME            The name of the directory to stow.  [required]
  --src SRC                    The (parent) source directory to stow from.
                               [required]
  --target TARGET              The (parent) target directory to stow into.
                               [required]
  --become / --no-become       Whether to stow using root permissions.
  --target-owner TARGET_OWNER  The user to who owns the destination folder.
  --help                       Show this message and exit.