link

manage a symbolic link

The step creates missing parent directories, owned by root with mode 0755.

Keys

KeyTypeDefaultMeaning
pathstringrequiredabsolute
targetstring-relative or absolute; need not exist
validatestring-check command, as for file
absentbooleanfalse
replacebooleanfalseremove another kind of thing at path first

link.path

string, required

Absolute. The step creates missing parent directories, owned by root with mode 0755.

link.target

string

Relative or absolute; need not exist.

link.validate

string

Check command, as for file.

link.absent

boolean, default false

Remove the link. A path of another kind fails the check.

link.replace

boolean, default false

Remove another kind of thing at path first, such as a file or a directory. Without it, such a thing fails the check.

Example

- link:
    path: /etc/nginx/sites-enabled/app
    target: /etc/nginx/sites-available/app