Version information
This version is compatible with:
- RedHat, Windows, Debian, Ubuntu, Solaris, SLES, AIX
Start using this module
Add this module to your Puppetfile:
mod 'reidmv-pe_mco_shell_agent', '2.0.0'
Learn more about managing modules with a PuppetfileDocumentation
pe_mco_shell_agent
####Table of Contents
##Overview
Installs the mcollective-shell-agent plugin for Puppet Enterprise MCollective installs.
##Setup
###What pe_mco_shell_agent affects
- Creates a plugin directory under MCollective's libdir:
- PE <= 3.8 -
/opt/puppet/libexec/mcollective
- PE >= 2015.1 -
/opt/puppetlabs/mcollective/plugins/
- PE <= 3.8 -
- Restarts the service on changes
Configuration
-
Easiest setup is adding class
pe_mco_shell_agent
to thePE MCollective
node group. Theinstall_app
andinstall_agent
parameters can be set to either install or uninstall/not install the application and agent, respectively. -
If setting up via code the following can be done:
To setup the MCO agent onto nodes the defaults can be used:
include pe_mco_shell_agent
or
class { 'pe_mco_shell_agent': }
To setup the MCO application on a node that has a MCO client present use:
class { 'pe_mco_shell_agent':
install_app => true,
}
If the MCO agent is not required on the MCO client node this can be removed/not installed by:
class { 'pe_mco_shell_agent':
install_app => true,
install_agent => false,
}
Usage
For full documentation of the plugin see https://github.com/puppetlabs/mcollective-shell-agent
Here's some examples:
run
# su - peadmin
$ peadmin@master:~$ mco shell run 'echo Hello world'
* [ ============================================================> ] 1 / 1
master.vm:
Hello world
Finished processing 1 / 1 hosts in 173.74 ms
start
Run a script ascryonously. Returns an ID that can be watch
ed or kill
ed
peadmin@master:/home/vagrant$ mco shell start "sleep 5 && echo '5 seconds'"
* [ ============================================================> ] 1 / 1
precise64.home: 116f9387-78d6-43dc-a493-232a41c1d9be
Finished processing 1 / 1 hosts in 175.77 ms
list
Used to list the job ID's for jobs from start
peadmin@master:/home/vagrant$ mco shell start "sleep 5 && echo '5 seconds'"
* [ ============================================================> ] 1 / 1
precise64.home: 116f9387-78d6-43dc-a493-232a41c1d9be
Finished processing 1 / 1 hosts in 175.77 ms
show
Used to see the output for jobs run by start
peadmin@master:/home/vagrant$ mco shell watch 116f9387-78d6-43dc-a493-232a41c1d9be
* [ ============================================================> ] 3 / 3
precise64.home stdout: 5 seconds
kill
Used to see the kill a job run by start
peadmin@master:/home/vagrant$ mco shell kill 116f9387-78d6-43dc-a493-232a41c1d9be
* [ ============================================================> ] 3 / 3
precise64.home stdout: 5 seconds
##Limitations
Primary support is for Debian-family and RedHat, but should work on all Linux flavours.
Partial Windows suport is also available
Dependencies
- puppetlabs/stdlib (>= 3.2.0 < 5.0.0)