title: Have puppet ensure a service is running only when not in a maintenance mode
body: <p>I have a basic service check in a puppet manifest I want running most of the time with just</p>
  
  <pre><code>service{ $service_name :
      ensure =&gt; "running",
      enable =&gt; "true",
  }
  </code></pre>
  
  <p>The thing is there are periods of maintenance I would like to ensure puppet doesn't come along and try to start it back up.</p>
  
  <p>I was thinking creating a file "no_service_start" in a specified path and do a 'creates' check like you could do with a guard for exec but it doesn't look like that's available for the service type.</p>
  
  <p>My next thought was to have the actual service init script do the check for this file itself and just die early if that guard file exists.</p>
  
  <p>While this works in that it prevents a service from starting it manifests itself as a big red error in puppet (as expected).  Given the service not starting is a desired outcome if that file is in place I'd rather not have an error message present and have to spend time thinking about if it's "legit" or not.</p>
  
  <p>Is there a more "puppet" way this should be implemented though?</p>