file_copy_from_local_source_with_check

Ensure that a file or directory is copied from a local source if a check command succeeds.

⚙️ Compatible targets: Linux

⚠️ Deprecated: This method is deprecated and should not be used.

Parameters

NameDocumentation
sourceSource file (absolute path on the target node).

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

This parameter is required.
check_commandCommand to run, it will get the source path as argument.

This parameter is required.
rc_okReturn codes to be considered as valid, separated by a comma (default is 0).

This parameter is optional.

Outcome conditions

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

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

Example

method: file_copy_from_local_source_with_check
params:
  check_command: VALUE
  path: VALUE
  source: VALUE
  rc_ok: OPTIONAL_VALUE

Documentation

This method is a conditional file copy.