Browse Source

README: usage examples, including the recipe section improved

Xabier de Zuazo 11 years ago
parent
commit
0738f4c538
1 changed files with 27 additions and 1 deletions
  1. 27 1
      README.md

+ 27 - 1
README.md

@@ -1138,13 +1138,39 @@ Configures the Dovecot service. Used by the default recipe.
 Usage Examples
 Usage Examples
 ==============
 ==============
 
 
-You can simply include the default recipe in your *Run List* or include it from a recipe:
+## Including in a Cookbook Recipe
+
+You can simply include it in a recipe:
 
 
 ```ruby
 ```ruby
 # from a recipe
 # from a recipe
 include_recipe 'dovecot'
 include_recipe 'dovecot'
 ```
 ```
 
 
+Don't forget to include the `dovecot` cookbook as a dependency in the metadata.
+
+```ruby
+# metadata.rb
+[...]
+
+depends 'dovecot'
+```
+
+## Including in the Run List
+
+Another alternative is to include the default recipe in your Run List.
+
+```json
+{
+  "name": "mail.onddo.com",
+  [...]
+  "run_list": [
+    [...]
+    "recipe[dovecot]"
+  ]
+}
+```
+
 ## Authentication Database Examples
 ## Authentication Database Examples
 
 
 Authentication database attributes, inside passdb or usedb hash values, can contain both arrays or hashes.
 Authentication database attributes, inside passdb or usedb hash values, can contain both arrays or hashes.