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 agentmyagentactions=myfunctionCreated 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.
| 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 ... |