Is it possible to differentiate a puppet agent run from a puppet apply run? Is there a convenient environment variable or fact to check within my manifests?

  • Not convenient would be deriving this from $default_file_terminus value as they are different, but this is implicit dependency. – ITL Aug 13 '15 at 14:30

The $trusted['authenticated'] fact might work for you. The value will be:

  • local for puppet apply
  • remote (Or possibly false) for puppet agent

This is one of the trusted facts in puppet, check out Puppet Labs' documentation for more details on this fact: https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html#trusted-facts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.