Skip to content
ohtools@docs:/declarative/file-fact
verified/seq 4
view /declarative/file-fact

File facts

Modules / file-fact

Inspect a path without following an untrusted symlink.

read-onlyfacts2 fields

YAML example

- name: Inspect configuration
  file_fact:
    path: /etc/example/app.conf
    register: app_config

Schema fields

FieldTypeRequiredConstraint
pathstringyesAbsolute path to inspect.
registerstringyesLocal fact name used by later assertions.