Skip to Content
Learning MCollective
book

Learning MCollective

by Jo Rhett
August 2014
Intermediate to advanced
284 pages
5h 24m
English
O'Reilly Media, Inc.
Content preview from Learning MCollective

Chapter 20. Creating Other Plugins

MCollective allows you to create plugins to replace or enhance much of the built-in functionality. This chapter covers most of the plugin types, where you can find examples to get you started, and the subdirectory where you should place your newly created plugins. 

For example, if you are creating an auditing plugin, you would take these steps:

$ mco plugin generate agent myagent actions=myfunction
Created plugin directory : myagent
Created DDL file : myagent/agent/myfunction.ddl
Created Agent file : myagent/agent/myfunction.rb

$ cd myagent
$ mkdir audit
$ $EDITOR audit/myaudit.rb

Table 20-1 shows a list of all the plugin types, and which directory underneath myagent/ you should put the file you create. We already discussed the first two (agent and application) in Chapter 5.

Table 20-1. MCollective plugin types
Plugin type Documentation Subdirectory

Server agent

http://docs.puppetlabs.com/mcollective/simplerpc/agents.html

agent

Client

http://docs.puppetlabs.com/mcollective/reference/plugins/application.html

application

Data plugin

http://docs.puppetlabs.com/mcollective/reference/plugins/data.html

data

Fact plugin

http://docs.puppetlabs.com/mcollective/reference/plugins/facts.html

facts

Auditing

http://docs.puppetlabs.com/mcollective/simplerpc/auditing.html

audit

Validator

http://docs.puppetlabs.com/mcollective/reference/plugins/validator.html

validator

Discovery

http://docs.puppetlabs.com/mcollective/reference/plugins/discovery.html ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Russell Rules

Russell Rules

Bill Russell
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
How You Play the Game

How You Play the Game

Jerry Colangelo, Len Sherman

Publisher Resources

ISBN: 9781491945681Errata