Reputation: 630
Does Puppet store a counter that contains the number of times it has executed ? I am trying to write some logic that requires this information. Say, if its running the first time, perform 10 tasks and so on.
Upvotes: 0
Views: 80
Reputation: 429
As suggested in a previous comment, there is no internal run count storage to puppet that I'm aware of, although if you're also utilizing puppetdb, you could see how many catalogs were compiled in the last 14 days. I don't find this metric to be very meaningful, but if you're controlling the run interval (default of once every 30 minutes if I'm not mistaken), you should be able to determine how many times puppet should have run given the age of the system.
I'm curious, though... how would use this metric if it were easily generated?
Upvotes: 1
Reputation: 630
I figured out one way is to check the Unix creation date ( https://serverfault.com/questions/221377/how-to-determine-the-age-of-a-linux-system-since-installation ).
That is clearly not the same as Puppet execution "runs" but its the closest I have gotten. Unless anyone has any other suggestions, I will proceed with using this.
Thanks all !
Upvotes: 0