Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

puppet apply vs puppet agent -t

Tags:

puppet

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?

like image 239
JavaYouth Avatar asked Nov 19 '18 09:11

JavaYouth


1 Answers

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.

like image 128
Alex Harvey Avatar answered Nov 20 '22 07:11

Alex Harvey