2

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?

Sven
  • 98,649
  • 14
  • 180
  • 226
ITL
  • 231
  • 3
  • 10
  • 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

1 Answers1

2

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 the official documentation.

рüффп
  • 620
  • 1
  • 11
  • 25
daxlerod
  • 223
  • 1
  • 6