Configuration: Editing Settings on the Command Line
Included in Puppet Enterprise 2016.1.
Puppet loads most of its settings from the puppet.conf config file. You can edit this file directly, or you can change individual settings with the
puppet config set command.
When to Use This
We recommend using
puppet config setfor:
- Fast one-off config changes
- Scriptable config changes in provisioning tools
If you find yourself changing many settings at once, you might prefer to edit the puppet.conf file or manage it with a template.
To assign a new value to a setting, run:
$ sudo puppet config set <SETTING NAME> <VALUE> --section <CONFIG SECTION>
This will declaratively set the value of
<SETTING NAME> to
<VALUE> (in the specified config section). It will work the same way regardless of whether the setting already had a value.
--section option specifies which section of puppet.conf to modify. It is optional, and defaults to
main. Valid sections are:
main(default) — used by all commands and services
master— used by the Puppet master service and the
agent— used by the Puppet agent service
user— used by the Puppet apply command and most other commands
If modifying the system config file, be sure to use
sudo or run the command as
# /etc/puppetlabs/puppet/puppet.conf [main] certname = agent01.example.com server = master.example.com vardir = /var/opt/lib/pe-puppet [agent] report = true graph = true pluginsync = true [master] dns_alt_names = master,master.example.com,puppet,puppet.example.com
$ sudo puppet config set trusted_node_data true --section master $ sudo puppet config set ordering manifest
# /etc/puppetlabs/puppet/puppet.conf [main] certname = agent01.example.com server = master.example.com vardir = /var/opt/lib/pe-puppet ordering = manifest [agent] report = true graph = true pluginsync = true [master] dns_alt_names = master,master.example.com,puppet,puppet.example.com trusted_node_data = true