The catalog: compile & apply
How a run actually works.
The catalog is the heart of a Puppet run: a node-specific document listing every resource and its desired state, plus the dependency graph. On each run the agent sends its facts to the master; the master compiles the manifests (with those facts and Hiera data) into a catalog just for that node and sends it back; the agent then applies the catalog, converging each resource, and reports the results. Compile on the master, apply on the agent.
$ puppet agent -t # trigger a run now (test mode)Info: Applying configuration version '1699...'Notice: /Stage[main]/Nginx/File[/etc/nginx/nginx.conf]/content: content changedNotice: /Stage[main]/Nginx/Service[nginx]: Triggered 'refresh'Notice: Applied catalog in 4.21 seconds
noop: the dry run
Puppet’s equivalent of a plan is noop mode (--noop): it compiles and evaluates the catalog and reports exactly what it would change, without changing anything. Running puppet agent -t --noop is the safe preview before letting a change loose, and is invaluable when testing a manifest edit against a real node. As with other tools, run noop first, read the diff, then apply for real.