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
Solution
Before you begin: Install the puppetlabs-support_tasks
module. To use the tasks in the support_tasks
module with Puppet, install Bolt on a workstation.
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.txt
by 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_mode
is set toenable
. 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 puppet_mode
to disable
.
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
Note: The reason
parameter is optional.
Comments
0 comments
Please sign in to leave a comment.