Exec
Prefer a declarative resource when it already owns the desired state. Use exec for explicit work with an author-defined convergence policy.
The parent directory must already exist or be declared as a prerequisite.
Exactly one of command and shell_command is required. At least one nonempty guard policy, refresh_only = true, or always = true is required. Empty lists alone do not supply a policy. Nullable optional scalar fields and exit-code lists use their default and unmanaged rules; guards and environment require actual lists/maps.
Guards
Guards run in the same execution context with empty stdin. Normal nonzero probe exits are boolean results; launch errors, signals, unreadable paths, and timeouts are failures. Guards should be read-only. They are not sandboxed.
Accepted unchanged exits ran the command but do not trigger notifications. Successful ordinary execs are not automatically retried.
Refresh-only work
Use the real application-specific command in place of /usr/bin/true. Guards are evaluated again at delivery. Coalesced refresh obligations may be delivered again after a crash.
Process behavior
The default shared resource budget is five minutes. The runner drains both output streams while supplying stdin, captures at most 512 KiB per stream, and continues draining excess output. Successful nonsensitive output appears in JSON and final stored reports with a truncation flag. Sensitive, failed, validator, probe, and systemd output is discarded.
Identity setup uses trusted setpriv, initializes supplementary groups, and uses NSS for primary-group lookup. There is no automatic account dependency from a literal identity string; add explicit ordering when needed.
Timeout cancellation sends TERM to the owned process group, then KILL after a one-second grace period and reaps the leader. Escaped descendants or uninterruptible kernel calls prevent a hard termination guarantee.
After interruption, execs re-evaluate their guards. An always = true command runs again on the next apply, and refresh-only commands can repeat after interrupted delivery. No manual journal acknowledgement is required; configure guards when repeated side effects must be avoided. See recovery. Capability: exec.process.v1.