what is the puppet agent status on the machine?

A one-liner to get the current status is:

cat `puppet agent --configprint agent_disabled_lockfile`

Generally, this must be run as root, so I use:

sudo cat `sudo puppet agent --configprint agent_disabled_lockfile`

There are a number of possible results.

  • cat: \path\to\lock: No such file or directory Puppet is not disabled.
  • Any other text means that puppet is disabled, and the text is the reason provided when puppet was disabled by puppet agent --disable 'reason'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)