You’ve identified a group of nodes where you’d like to enable or disable the Puppet daemon.
Version and installation information
Puppet version: 5.0 and 6.0
Learn more about:
Follow these steps to run tasks to enable and disable the daemon:
To enable agents:
By default, this will enable all agents. However, you can apply it to a set of nodes by editing the list of nodes created in the first step.
Create a list of disabled nodes in
nodefile.txtby using the steps in Identifying nodes where the Puppet daemon is enabled or disabled.
Enable the agents in the list by running a task with the list of nodes as input. The required parameter
puppet_modeis set to
enable. On the primary server, run:
bolt task run support_tasks::st0286_change_puppet_daemon_runmode puppet_mode=enable --nodes @nodefile.txt
To disable agents:
Disable an agent by running task st0285 that sets the parameter
For example to disable an agent that you’re doing testing on, on the primary server, run:
bolt task run support_tasks::st0286_change_puppet_daemon_runmode puppet_mode=disable reason='down for testing'--targets agent1.example.com
reason parameter is optional.