12

I am new to puppet and while going through puppet courses, I found one person using 'puppet agent -t' command to configure an agent node while in another course, the instructor using 'puppet apply' command.

What is the difference between these two commands?

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97
JavaYouth
  • 1,536
  • 7
  • 21
  • 39

1 Answers1

22

These are:

  • puppet apply - applies or "executes" Puppet code on the local machine.
  • puppet agent -t also sometimes written puppet agent --test - calls the Puppet Agent to retrieve a catalog (compiled Puppet code) from a Puppet Master, and then applies it locally and immediately.

Note that -t is badly-named, and it may originally have been intended for "testing" but in fact it is not a "test" mode at all, but will make changes to your machine.

See also puppet agent --noop for the real "test" (dry-run) mode.

Alex Harvey
  • 14,494
  • 5
  • 61
  • 97