|
What providers are available?The real question you should be asking is "What providers are available for a given Resource?" You can find that answer by looking at the Resources page, in the Providers section for any individual resource type. How does Chef know which Provider to use?Chef maps Providers to Platforms (and Platform Versions) via Chef::Platform. In this class you will find a class instance variable @platforms, which consists of a Hash of various Platforms and Versions. We look up the resource type in this hash according to your Nodes platform and platform_version Attributes (which are provided by Ohai). How do Providers... Provide?We did our best to keep adding new Providers to Chef as simple as possible. For each resource:
For example, given a resource such as: "Sample Resource" We would:
That's it! How do I write new Providers?If you want to write your own providers for resources that don't exist in Chef, you can use Lightweight Resources and Providers (LWRP) in your cookbook(s). If you want to write a new provider for Chef itself and contribute to the project, that's awesome! We will help you out as much as we can. Go read the instructions for how to contribute to an Opscode project, hop on the Chef IRC channel, and get started.
|
|
|


