Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
- Puppet >= 3.0.0 < 7.0.0
- , , , , , , , ,
Tasks:
- agent_disenable
Start using this module
Add this module to your Puppetfile:
mod 'gabe-agent_disenable', '1.0.0'
Learn more about managing modules with a PuppetfileDocumentation
Overview
This task makes it easy to enable or disable a Puppet agent remotely. It simply runs the puppet agent --enable
or puppet agent --disable
command for you on the remote host. You can optionally supply a message for a disabled agent to report when someone tries to run the disabled agent.
Parameters
The task takes one required parameter, and optionally a second.
action
(required)
Set to enable
or disable
to put the agent in the desired state.
message
(optional)
An optional message to append to the --disable
flag.
Usage
Puppet Enterprise console
Once the module is available in your production code environment, it will become available in the console and you can use it just like any other task.
Command Line
You'll need to supply the parameters on the command line, as in the following two examples.
bolt task run agent_disenable action=disable message='hand edits rock' \
--user root --password --targets ssh://kermit,ssh://gonzo,ssh://animal
bolt task run agent_disenable action=enable \
--user Administrator --password --targets winrm://hoggle,winrm://bowie
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.