dandyrow.linux.stow (2.6.0) — module

Module to interact with the GNU stow symbolic link manager.

| "added in version" 1.0.0 of dandyrow.linux"

Authors: Daniel Lowry (@dandyrow)

Install collection

Install with ansible-galaxy collection install dandyrow.linux:==2.6.0


Add to requirements.yml

  collections:
    - name: dandyrow.linux
      version: 2.6.0

Description

Module to interact with the GNU stow symbolic link manager.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Symlink zsh config files from dotfiles folder to home folder
- name: Stow zsh dotfiles into home
  dandyrow.stow.stow:
    src: ~/.dotfiles
    package: [ zsh ]
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove symlink of pacman config files from /etc
- name: Remove pacman config
  become: yes
  dandyrow.stow.stow:
    src: ~/.dotfiles
    dest: /etc/pacman.conf
    package:
      - pacman
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Force the deletion of any conflicting files when stowing
- name: Forcefully stow terminal configs
  dandyrow.stow.stow:
    src: ~/.dotfiles
    package:
        - zsh
        - neofetch
        - starship
    force: Yes
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Delete and re-stow git config
- name: Restow gitconfig
  dandyrow.stow.stow:
    src: ~/.dotfiles
    package: [ git ]
    state: restow

Inputs

    
src:
    aliases:
    - dir
    description: The source path of the folders (packages) containing files to create
      symlinks for.
    required: true
    type: path

dest:
    aliases:
    - target
    description: The target path where the symlinks will be created.
    required: false
    type: path

force:
    default: false
    description: Whether to delete conflicting files in destination directory.
    type: bool

state:
    choices:
    - present
    - absent
    - restow
    default: present
    description: Indicates the desired action for the module to carry out.
    type: str

package:
    aliases:
    - pkg
    description: Name(s) of folders containing the files to be symlinked.
    elements: str
    required: true
    type: list