I am trying to write an if clause to do something according to the current status of a machine. I understand according to puppet's philosophy catalogs evaluate and push to the machines before they run in machines.
To keep consistency I would like to use puppet instead of using custom scripts (like bash). I need this kind of behavior in puppet if it would be possible.
Here's an example: puppet agent runs every hour on a machine: - pulling a repo to see any new commit - searching for a specific word in the repo - if found: trigger some dependencies - if not found: trigger other dependencies
My problem: 'If clause' already had evaluated in puppet server so there is not any way to make dependencies in the desired order according to the machine status.
Any idea?