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.

Outcome conditions

You need to replace ${path} with its actual canonified value.

  • ✅ Ok: file_check_symlinkto_${path}_ok
    • ☑️ Already compliant: file_check_symlinkto_${path}_kept
    • 🟨 Repaired: file_check_symlinkto_${path}_repaired
  • ❌ Error: file_check_symlinkto_${path}_error

Example

method: file_check_symlinkto
params:
  target: VALUE
  path: 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.