LinuxWindows

Where Does Puppet Store Config and Code?

Puppet splits config between /etc/puppetlabs (settings and code) on the machine and the agent's state and SSL certs beside it.

Last updated

Puppet's filesystem layout mirrors its client-server split. The puppet.conf file sets master, environment, and run behavior. The code directory holds manifests, modules, and Hiera data that the master compiles into catalogs. Agents cache those catalogs plus reports and SSL material locally.

Ask the tool when paths disagree with docs. puppet config print resolves confdir, codedir, vardir, and ssldir per machine including overrides. Package, gem, and source installs all answer the same way, which ends most path arguments quickly.

Where Puppet stores this, by platform

Linux
/etc/puppetlabs/puppet/puppet.conf

puppet.conf for settings, code/ for manifests and Hiera data. Agent cache, reports, and SSL certs live under /opt/puppetlabs. Ask puppet config print when in doubt.

Windows
C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf

Same split under ProgramData: confdir holds puppet.conf, and SSL plus cache sit nearby. The service account's permissions on these folders cause most Windows agent failures.

Frequently asked questions

How do I print the real directories on a node?

Run puppet config print confdir (and ssldir, vardir) on that machine. It prints the resolved directories including any overrides, which beats memorizing defaults per platform.

The agent fails with certificate errors. What resets it?

Delete the agent's SSL directory and re-run puppet agent to generate a fresh certificate request. The master signs it again, which fixes most name-change and clock-skew breakage.

Notice an outdated path? Let us know.