2. Configure the server setting

The server is setting, which allows you to connect the agent to the primary Puppet server, is the only mandatory setting.

You can add configuration to agents by using the puppet config set sub-command, which edits puppet.conf automatically, or editing /etc/puppetlabs/puppet/puppet.conf directly.

  1. To configure the server setting, choose from one of the following options:
    • On the agent node, run:

      puppet config set server puppetserver.example.com --section main

    • Manually edit /etc/puppetlabs/puppet/puppet.conf or C:\ProgramData\PuppetLabs\puppet\etc\puppet.conf.

      Note that the location on Windows depends on whether you are running with administrative privileges. If you are not, it will be in home directory, not system location.

Results This command adds the setting server = puppetserver.example.com to the [main] section of puppet.conf.

Note that there are other optional settings, for example, serverport, ca_server, ca_port, report_server, report_port, which you might need for more complicated Puppet deployments, such as when using a CA server and multiple compilers.