chef-recipe 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +22 -1
- data/lib/chef-recipe/version.rb +1 -1
- data/lib/chef/application/recipe.rb +2 -0
- metadata +1 -1
data/README.md
CHANGED
@@ -20,7 +20,28 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
## Usage
|
22
22
|
|
23
|
-
|
23
|
+
Execute the chef-recipe command as follows. You may need to execute it
|
24
|
+
using sudo.
|
25
|
+
|
26
|
+
`sudo chef-recipe RECIPE_FILE`
|
27
|
+
|
28
|
+
The Recipe can contain any valid Chef resources. Here is a very simple
|
29
|
+
example recipe
|
30
|
+
|
31
|
+
```Ruby
|
32
|
+
|
33
|
+
file "/tmp/foobar.log" do
|
34
|
+
content <<-EOF
|
35
|
+
hello world!
|
36
|
+
EOF
|
37
|
+
end
|
38
|
+
|
39
|
+
link "/tmp/foobar.link" do
|
40
|
+
to "/tmp/foobar.log"
|
41
|
+
end
|
42
|
+
|
43
|
+
```
|
44
|
+
|
24
45
|
|
25
46
|
## Contributing
|
26
47
|
|
data/lib/chef-recipe/version.rb
CHANGED
@@ -88,9 +88,11 @@ class Chef::Application::Recipe < Chef::Application
|
|
88
88
|
def run_chef_recipe
|
89
89
|
recipe_path = ARGV[0]
|
90
90
|
recipe_path = find_recipe recipe_path
|
91
|
+
|
91
92
|
Chef::Config[:solo] = true
|
92
93
|
client = Chef::Client.new
|
93
94
|
client.run_ohai
|
95
|
+
client.load_node
|
94
96
|
client.build_node
|
95
97
|
run_context = if client.events.nil?
|
96
98
|
Chef::RunContext.new(client.node, {})
|