distinguish between manual run and timed daemon runs (pe-puppet agent)
how can i distiguish between time based runs by the agent, and manual run either via puppet agent -t or mco ?
Using the PE-Console i also cannot distiguish between runs !
On every run the agent changes these files:
/opt/puppetlabs/puppet/cache/state/resources.txt /opt/puppetlabs/puppet/cache/state/transactionstore.yaml /opt/puppetlabs/puppet/cache/state/classes.txt /opt/puppetlabs/puppet/cache/state/state.yaml /opt/puppetlabs/puppet/cache/state/last_run_report.yaml /opt/puppetlabs/puppet/cache/state/last_run_summary.yaml /opt/puppetlabs/puppet/cache/client_data/catalog /opt/puppetlabs/puppet/cache/client_data/catalog/client.domain.com.json
I checked these files but didn't see any difference in the way i started the agent run.
There are some security considertations to which has driven me to raise that particular question.
If not, it should be no problem to write a state file where the timer writes the time until next run in epoch format ?
Checking the file /opt/puppetlabs/puppet/lib/ruby/vendorruby/puppet/scheduler/job.rb it seems to be quite easy to write @lastrun to the puppet cache file which would solve my problem immediately.