title: Puppet — if condition according to current status of machine
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>Here's an example: puppet agent runs every hour on a machine:</p>
  
  <p>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</p>
  
  <p>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.</p>
  
  <p>Any idea?</p>