Chef offers the opportunity to extend the list of available resources by creating a custom Light Weight Resource Provider (LWRP). By creating your own custom resources, you can simplify writing cookbooks because your own custom resources enrich the Chef DSL and make your recipe code more expressive.
Many of the custom resources in Opscode's community cookbooks (and elsewhere) are implemented as LWRPs. So there are many working examples in the real world such as
apt_repository, and many more.
In this section, we will create a very simple LWRP to demonstrate the basic mechanics.
Make sure you've a cookbook named
greeting and the
run_list of your node includes