file_check_symlinkto

Checks if first file is symlink to second file.

⚙️ Compatible targets: Linux

Parameters

NameDocumentation
pathSymbolic link (absolute path on the target node).

This parameter is required.
targetTarget file (absolute path on the target node).

This parameter is required.

Example

method: file_check_symlinkto
params:
  path: VALUE
  target: VALUE

Documentation

This bundle will define a condition file_check_symlinkto_${target}_{ok, reached, kept} if the file ${path} is a symbolic link to ${target}, or file_check_symlinkto_${target}_{not_ok, reached, not_kept, failed} if if it is not a symbolic link, or any of the files does not exist. The symlink's path is resolved to the absolute path and checked against the target file's path, which must also be an absolute path.