Skip to content

stat

!stat

Category: files

Stat a remote path and save the result (exists, is_dir, mode, owner, group) into a host variable for later use. Read-only; never modifies the target.

Parameters

NameTypeRequiredDescription
pathpathyesRemote path to inspect.
savestringyesVariable name under which the stat result map is stored.

Examples

- !stat
  path: /usr/local/bin/app
  save: app_binary