Skip to content
auser edited this page Sep 13, 2010 · 11 revisions

Plugins are a cornerstone of PoolParty. When you call


apache do
end

You are using the apache2 plugin. I’m going to show you quickly how to get your plugin off the ground.

The basic template of a plugin looks like:


class PluginClass
  plugin :plugin_name do
    # Plugin methods here
  end
end

PoolParty gives the singleton method :plugin to the class allowing the above.

From there, you can call your plugin from within your pool.spec file.

When your plugin is called without a block, like so


	cloud :app do
		plugin_name
		...

The method that gets called is :enable.


	class PluginClass
	  plugin :plugin_name do
	    # Plugin methods here
		def enable
			has_file(:name => "/etc/cool/file/name")
		end
	  end
	end

MORE COMING SOON

Clone this wiki locally