0

I am currently learning to use Puppet v.6 in a master-agent configuration (I am using the open-source version). I come from Ansible and SaltStack background, so although some concepts are familiar, there are others that are very Puppet particular..

One of these concepts is how to get a snapshot report to track state changes on a daily basis. Basically I am running a couple of tasks in the main manifest as noop => "true".

I noticed that the Puppet agents download and run the catalog from the master every 30 mins / 1 hour and dump a last_run_report.yaml file locally. OK that's fine and let's say I can live with having to manage one file on every agent (ideally I prefer one digest a-la Salt Stack, that can be analysed from the master).

How can I easily parse all of these files to that I can easily know which nodes have drifted away from the master's main manifest? Example a user changed the /etc/hosts file one of the nodes, etc?

My question is whether I am trying to re-invent the wheel or there is a better recommended solution?

James
  • 123
  • 6

1 Answers1

0

The way I decided to go around this, which I believe is quite a common scenario, is to:

  1. On orchestration of a new agent, enforce state against master's manifest with puppet agent -t
  2. Make sure that puppet agent service is not run automatically by adjusting /etc/puppet.conf accordingly
  3. Run puppet agent as a puppet cron or a Linux/Windows cronjob with the --noop option and make it email the daily report found inside /opt/puppetlabs/puppet/cache/state/last_run_report.yaml
James
  • 123
  • 6