Installing and configuring puppet-code

Puppet Enterprise (PE) automatically installs and configures the puppet-code command on your primary server as part of the included PE client tools package. You can also set up puppet-code on an agent node or workstation, customize configuration for different users, or change the global configuration settings.

The global configuration settings for *nix and macOS systems are in a JSON file located at:

/etc/puppetlabs/client-tools/puppet-code.conf

By default, this configuration file contains:

{
"cacert": "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
"token-file": "~/.puppetlabs/token",
"service-url": "https://<PRIMARY_HOSTNAME>:8170/code-manager"
 }

On Windows systems, the global configuration settings are located at:C:\ProgramData\PuppetLabs\client-tools\puppet-code.conf

On Windows, the default configuration file contains:

{
"cacert": "C:\\ProgramData\\PuppetLabs\\puppet\\etc\\ssl\\certs\\ca.pem",
"token-file": "C:\\Users\\<username>\\.puppetlabs\\token",
"service-url": "https://<PRIMARY_HOSTNAME>:8170/code-manager"
 }

On PE-managed machines, Puppet manages this file for you. Don't manually edit this file, because Puppet overwrites your changes the next time it runs.

In addition to the global settings, you can:

When Deploying environments with puppet-code, you can use the default config file, an alternative config file, or config settings supplied directly in the command.