view /declarative/file-fact
File facts
Modules / file-fact
Inspect a path without following an untrusted symlink.
YAML example
- name: Inspect configuration
file_fact:
path: /etc/example/app.conf
register: app_configSchema fields
| Field | Type | Required | Constraint |
|---|---|---|---|
path | string | yes | Absolute path to inspect. |
register | string | yes | Local fact name used by later assertions. |