r/Puppet • u/cvquesty • 18d ago
When something looks wrong, I reach for `puppet resource` before I open a manifest
When a node is misbehaving, my first move usually isn't reading the module. It's:
puppet resource asks the agent for the live state of a type/title pair and prints it in Puppet's own language. If that doesn't match what you thought the catalog was enforcing, you've already narrowed the problem.
A few patterns that keep paying off for me:
- Service "restarted" but still wrong —
puppet resource service …often shows enable/ensure aren't what you assumed. - Wrong package actually installed — especially on RHEL where
ntpvschronystill trips people up. - User/UID surprises — compare live
puppet resource user …against what Hiera was supposed to supply.
It isn't a replacement for proper testing or code review. It's a five-second reality check before you burn an hour rewriting a class that was fine.
Curious what other folks use as their first live diagnostic on a weird node — puppet resource, facter, something else?