Install macOS agents

On macOS, agents have core Puppet functionality and platform-specific capabilities like package installation, LaunchD service management, System Profiler facts inventory, and directory services integration. You can install agents on macOS nodes with the install script, from the Puppet Enterprise (PE) console, from Finder, and more.

We recommend you Install agents with the install script or Install agents from the console whenever possible. If you want to install macOS agents with PE package management, follow the steps to Install *nix agents with PE package management. If you want to install agents from Finder or the macOS command line, follow the steps below.

Install macOS agents from Finder

You can use Finder to install agents on macOS nodes.

  1. Download the appropriate agent tarball.
  2. Open the agent package .dmg and click the installer .pkg.
  3. Follow installer dialog prompts. You must provide the primary server's hostname and the agent's certname.
    For macOS agents, the certname is derived from the machine's name. For best compatibility, make sure the node's name doesn't include capital letters (for example, My-Example-Mac must be my-example-mac). If you don’t want to change the computer’s name, enter the agent certname in all lowercase letters when prompted by the installer.
  4. Run puppet agent -t to add the node to the node inventory and generate the CSR.
  5. Accept the CSR as explained in Managing certificate signing requests.

Install macOS agents from the command line

You can use the command line to install agents on macOS nodes.

  1. Download the appropriate agent tarball.
  2. SSH into the target node as root or sudo.
  3. To mount the disk image, run: sudo hdiutil mount <DMGFILE>
  4. Locate a line ending with /Volumes/puppet-agent-<VERSION>. This directory location is the mount point for the virtual volume created from the disk image.
  5. Change to the mount point directory, such as with: cd /Volumes/puppet-agent-<VERSION>
  6. To install the agent package, run: sudo installer -pkg puppet-agent-installer.pkg -target /
  7. To verify the installation, run: /opt/puppetlabs/bin/puppet --version
  8. To set the primary server's hostname in the node's puppet.conf file, run: /opt/puppetlabs/bin/puppet config set server <PRIMARY_HOSTNAME>
    Go to Customize the install script for more information about cpuppet.conf.
  9. To set the agent's certname in the node's puppet.conf file, run: /opt/puppetlabs/bin/puppet config set certname <AGENT_CERTNAME>
    For macOS agents, the certname is derived from the machine's name. For best compatibility, make sure the node's name doesn't include capital letters (for example, My-Example-Mac must be my-example-mac). If you don’t want to change the computer’s name, enter the agent certname in all lowercase letters.
  10. Run puppet agent -t to add the node to the node inventory and generate the CSR.
  11. Accept the CSR as explained in Managing certificate signing requests.