Install macOS agents from the command line
You can use the command line to install agents on macOS nodes.
- Download the appropriate agent tarball.
- SSH into the target node as root or sudo.
- To mount the disk image, run:
sudo hdiutil mount <DMGFILE> - 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. - Change to the mount point directory, such as with:
cd /Volumes/puppet-agent-<VERSION> - To install the agent package, run:
sudo installer -pkg puppet-agent-installer.pkg -target / - To verify the installation, run:
/opt/puppetlabs/bin/puppet --version - To set the primary server's hostname in the node's
puppet.conffile, run:/opt/puppetlabs/bin/puppet config set server <PRIMARY_HOSTNAME>Go to Customize the install script for more information about c
puppet.conf. - To set the agent's
certnamein the node'spuppet.conffile, run:/opt/puppetlabs/bin/puppet config set certname <AGENT_CERTNAME>For macOS agents, the
certnameis derived from the machine's name. For best compatibility, make sure the node's name doesn't include capital letters (for example,My-Example-Macmust bemy-example-mac). If you don’t want to change the computer’s name, enter the agentcertnamein all lowercase letters. - Run
puppet agent -tto add the node to the node inventory and generate the CSR. - Accept the CSR as explained in Managing certificate signing requests.






