• AnsibleFest
  • Products
  • Community
  • Webinars & Training
  • Blog
Ansible Logo
dandyrow.linux Documentation
dandyrow.linux Ansible collection
  • dandyrow.linux.stow module – Module to interact with the GNU stow symbolic link manager.
    • Synopsis
    • Parameters
    • Examples
      • Authors
      • Collection links
  • dandyrow.linux.cloud_init role – Install and configure cloud-init
  • dandyrow.linux.disks role – Declare disk setup as code
  • dandyrow.linux.doas role – Installs opendoas and removes sudo
  • dandyrow.linux.locale role – Configure system locale
  • dandyrow.linux.networkmanager role – Install and enable NetworkManager
  • dandyrow.linux.stow_dotfiles role – Install dotfiles from remote Git repository
  • dandyrow.linux.swapfile role – Create & setup swapfile
  • dandyrow.linux.systemd_boot role – Installs and configures systemd-boot
  • dandyrow.linux.systemd_networkd role – Configure basic defaults with systemd-networkd
  • dandyrow.linux.timezone role – Configure timezone & hwclock
  • dandyrow.linux.zsh role
dandyrow.linux Ansible collection
  • dandyrow.linux.stow module – Module to interact with the GNU stow symbolic link manager.
  • Edit on GitHub

dandyrow.linux.stow module – Module to interact with the GNU stow symbolic link manager.

Note

This module is part of the dandyrow.linux collection (version 2.6.0).

To install it, use: ansible-galaxy collection install dandyrow.linux.

To use it in a playbook, specify: dandyrow.linux.stow.

New in dandyrow.linux 1.0.0

  • Synopsis

  • Parameters

  • Examples

Synopsis

  • Module to interact with the GNU stow symbolic link manager.

Parameters

Parameter

Comments

dest

aliases: target

path

The target path where the symlinks will be created.

force

boolean

Whether to delete conflicting files in destination directory.

Choices:

  • false ← (default)

  • true

package

aliases: pkg

list / elements=string / required

Name(s) of folders containing the files to be symlinked.

src

aliases: dir

path / required

The source path of the folders (packages) containing files to create symlinks for.

state

string

Indicates the desired action for the module to carry out.

Choices:

  • "present" ← (default)

  • "absent"

  • "restow"

Examples

# Symlink zsh config files from dotfiles folder to home folder
- name: Stow zsh dotfiles into home
  dandyrow.stow.stow:
    src: ~/.dotfiles
    package: [ zsh ]

# 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

# 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

# Delete and re-stow git config
- name: Restow gitconfig
  dandyrow.stow.stow:
    src: ~/.dotfiles
    package: [ git ]
    state: restow

Authors

  • Daniel Lowry (@dandyrow)

Collection links

Issue Tracker Repository (Sources)

Previous Next

© Copyright Daniel Lowry.