link
Purpose: ensure a symbolic link at path points to target — or is
absent.
Synopsis
Section titled “Synopsis”- id: vimrc type: link with: path: /etc/vim/vimrc.local target: /opt/myapp/vimrc.localParameters
Section titled “Parameters”| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
path |
yes | string (absolute path) | — | Symlink path. |
target |
when present |
string | — | Link target. Required when state is present. |
state |
no | string | present |
present or absent. |
Expected behavior
Section titled “Expected behavior”present: creates the symlink if absent, or re-points an existing symlink whose target differs.absent: removes the symlink. Refuses to remove non-symlink objects as a link.- A symlink that really changes a systemd manager input (a unit file, drop-in,
alias/mask/
.wants/.requireslink, orsystem.conf) makes Sinter runsystemctl daemon-reloadautomatically before the next service or handler that needs it, and at the end of a successful apply. See service.
Idempotency
Section titled “Idempotency”Fully idempotent — a symlink already pointing at target is left alone.
Failure behavior
Section titled “Failure behavior”pathis an existing non-symlink (file, directory) → failure; Sinter will not replace it implicitly.- Unexpected symlinks in the parent path are rejected before mutation.
Platform notes
Section titled “Platform notes”Applies to all supported targets.