chef 0.10.0.beta.8 → 0.10.0.beta.9
Sign up to get free protection for your applications and to get access to all the features.
- data/distro/common/html/knife-bootstrap.1.html +69 -10
- data/distro/common/html/knife-client.1.html +25 -22
- data/distro/common/html/knife-configure.1.html +1 -1
- data/distro/common/html/knife-cookbook-site.1.html +91 -19
- data/distro/common/html/knife-cookbook.1.html +216 -76
- data/distro/common/html/knife-data-bag.1.html +1 -1
- data/distro/common/html/knife-environment.1.html +177 -3
- data/distro/common/html/knife-exec.1.html +44 -3
- data/distro/common/html/knife-index.1.html +1 -1
- data/distro/common/html/knife-node.1.html +5 -3
- data/distro/common/html/knife-recipe.1.html +1 -1
- data/distro/common/html/knife-role.1.html +83 -19
- data/distro/common/html/knife-search.1.html +43 -2
- data/distro/common/html/knife-ssh.1.html +57 -2
- data/distro/common/html/knife-status.1.html +33 -2
- data/distro/common/html/knife-tag.1.html +45 -1
- data/distro/common/html/knife.1.html +94 -161
- data/distro/common/html/shef.1.html +283 -0
- data/distro/common/man/man1/knife-bootstrap.1 +56 -4
- data/distro/common/man/man1/knife-client.1 +12 -11
- data/distro/common/man/man1/knife-configure.1 +1 -1
- data/distro/common/man/man1/knife-cookbook-site.1 +64 -22
- data/distro/common/man/man1/knife-cookbook.1 +200 -122
- data/distro/common/man/man1/knife-data-bag.1 +1 -1
- data/distro/common/man/man1/knife-environment.1 +167 -2
- data/distro/common/man/man1/knife-exec.1 +36 -3
- data/distro/common/man/man1/knife-index.1 +1 -1
- data/distro/common/man/man1/knife-node.1 +2 -1
- data/distro/common/man/man1/knife-role.1 +48 -24
- data/distro/common/man/man1/knife-search.1 +27 -3
- data/distro/common/man/man1/knife-ssh.1 +43 -2
- data/distro/common/man/man1/knife-status.1 +14 -2
- data/distro/common/man/man1/knife-tag.1 +32 -2
- data/distro/common/man/man1/knife.1 +91 -186
- data/distro/common/man/man1/shef.1 +237 -26
- data/distro/common/markdown/man1/knife-bootstrap.mkd +57 -7
- data/distro/common/markdown/man1/knife-client.mkd +19 -17
- data/distro/common/markdown/man1/knife-cookbook-site.mkd +63 -15
- data/distro/common/markdown/man1/knife-cookbook.mkd +220 -103
- data/distro/common/markdown/man1/knife-environment.mkd +144 -1
- data/distro/common/markdown/man1/knife-exec.mkd +29 -1
- data/distro/common/markdown/man1/knife-node.mkd +1 -1
- data/distro/common/markdown/man1/knife-role.mkd +36 -30
- data/distro/common/markdown/man1/knife-search.mkd +0 -1
- data/distro/common/markdown/man1/knife-ssh.mkd +0 -2
- data/distro/common/markdown/man1/knife-status.mkd +0 -2
- data/distro/common/markdown/man1/knife-tag.mkd +31 -0
- data/distro/common/markdown/man1/knife.mkd +93 -165
- data/distro/common/markdown/man1/shef.mkd +189 -0
- data/lib/chef/api_client.rb +36 -35
- data/lib/chef/application/knife.rb +1 -1
- data/lib/chef/client.rb +1 -0
- data/lib/chef/cookbook/cookbook_version_loader.rb +29 -7
- data/lib/chef/cookbook_uploader.rb +55 -36
- data/lib/chef/cookbook_version.rb +3 -1
- data/lib/chef/couchdb.rb +0 -1
- data/lib/chef/knife/cookbook_list.rb +1 -1
- data/lib/chef/knife/cookbook_show.rb +1 -0
- data/lib/chef/knife/core/generic_presenter.rb +3 -3
- data/lib/chef/knife/help.rb +6 -2
- data/lib/chef/knife/tag_create.rb +26 -5
- data/lib/chef/knife/tag_delete.rb +34 -5
- data/lib/chef/knife/tag_list.rb +24 -6
- data/lib/chef/node.rb +1 -0
- data/lib/chef/role.rb +1 -0
- data/lib/chef/shef.rb +1 -0
- data/lib/chef/version.rb +1 -1
- metadata +4 -4
- data/distro/common/man/man1/knife-recipe.1 +0 -13
- data/distro/common/markdown/man1/knife-recipe.mkd +0 -24
@@ -61,7 +61,20 @@
|
|
61
61
|
<div class='man-navigation' style='display:none'>
|
62
62
|
<a href="#NAME">NAME</a>
|
63
63
|
<a href="#SYNOPSIS">SYNOPSIS</a>
|
64
|
-
<a href="#
|
64
|
+
<a href="#SUBCOMMANDS">SUBCOMMANDS</a>
|
65
|
+
<a href="#CREATE">CREATE</a>
|
66
|
+
<a href="#DELETE">DELETE</a>
|
67
|
+
<a href="#EDIT">EDIT</a>
|
68
|
+
<a href="#FROM-FILE">FROM FILE</a>
|
69
|
+
<a href="#LIST">LIST</a>
|
70
|
+
<a href="#SHOW">SHOW</a>
|
71
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
72
|
+
<a href="#SYNTAX">SYNTAX</a>
|
73
|
+
<a href="#FORMAT">FORMAT</a>
|
74
|
+
<a href="#SEE-ALSO">SEE ALSO</a>
|
75
|
+
<a href="#AUTHOR">AUTHOR</a>
|
76
|
+
<a href="#DOCUMENTATION">DOCUMENTATION</a>
|
77
|
+
<a href="#CHEF">CHEF</a>
|
65
78
|
</div>
|
66
79
|
|
67
80
|
<ol class='man-decor man-head man head'>
|
@@ -79,11 +92,172 @@
|
|
79
92
|
|
80
93
|
<p><strong>knife</strong> <strong>environment</strong> <em>sub-command</em> <em>(options)</em></p>
|
81
94
|
|
82
|
-
<h2 id="
|
95
|
+
<h2 id="SUBCOMMANDS">SUBCOMMANDS</h2>
|
96
|
+
|
97
|
+
<p>Environment subcommands follow a basic create, read, update, delete
|
98
|
+
(CRUD) pattern. The following subcommands are available:</p>
|
99
|
+
|
100
|
+
<h2 id="CREATE">CREATE</h2>
|
101
|
+
|
102
|
+
<p><strong>knife environment create</strong> <em>environment</em> <em>(options)</em></p>
|
103
|
+
|
104
|
+
<dl>
|
105
|
+
<dt><code>-d</code>, <code>--description DESCRIPTION</code></dt><dd>The value of the description field.</dd>
|
106
|
+
</dl>
|
107
|
+
|
108
|
+
|
109
|
+
<p>Create a new environment object on the Chef Server. The envrionment will
|
110
|
+
be opened in the text editor for editing prior to creation if the -n
|
111
|
+
option is not present.</p>
|
112
|
+
|
113
|
+
<h2 id="DELETE">DELETE</h2>
|
114
|
+
|
115
|
+
<p><strong>knife environment delete</strong> <em>environment</em> <em>(options)</em></p>
|
116
|
+
|
117
|
+
<p>Destroy an environment on the Chef Server. A prompt for confirmation
|
118
|
+
will be displayed if the -y options is not given.</p>
|
119
|
+
|
120
|
+
<h2 id="EDIT">EDIT</h2>
|
121
|
+
|
122
|
+
<p><strong>knife environment edit</strong> <em>environment</em> <em>(options)</em></p>
|
123
|
+
|
124
|
+
<p>Fetch <em>environment</em> and display it in the text editor for editing. The
|
125
|
+
environment will be saved to the Chef Server when the editing session
|
126
|
+
exits.</p>
|
127
|
+
|
128
|
+
<h2 id="FROM-FILE">FROM FILE</h2>
|
129
|
+
|
130
|
+
<p><strong>knife environment from file</strong> <em>file</em> <em>(options)</em></p>
|
131
|
+
|
132
|
+
<p>Create or update an environment from the JSON or Ruby format <em>file</em>. See
|
133
|
+
<strong>format</strong> for the proper format of this file.</p>
|
134
|
+
|
135
|
+
<h2 id="LIST">LIST</h2>
|
136
|
+
|
137
|
+
<p><strong>knife environment list</strong> <em>(options)</em>
|
138
|
+
* <code>-w</code>, <code>--with-uri</code>:</p>
|
139
|
+
|
140
|
+
<pre><code>Show the resource URI for each environment
|
141
|
+
</code></pre>
|
142
|
+
|
143
|
+
<h2 id="SHOW">SHOW</h2>
|
144
|
+
|
145
|
+
<p><strong>knife environment show</strong> <em>environment</em> <em>(options)</em></p>
|
146
|
+
|
147
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
148
|
+
|
149
|
+
<p>Environments provide a means to apply policies to hosts in your
|
150
|
+
infrastructure based on business function. For example, you may have a
|
151
|
+
separate copy of your infrastructure called "dev" that runs the latest
|
152
|
+
version of your application and should use the newest versions of your
|
153
|
+
cookbooks when configuring systems, and a production instance of your
|
154
|
+
infrastructure where you wish to update code and cookbooks in a more
|
155
|
+
controlled fashion. In Chef, this function is implemented with
|
156
|
+
<em>environments</em>.</p>
|
157
|
+
|
158
|
+
<p>Environments contain two major components: a set of cookbook version
|
159
|
+
constraints and environment attributes.</p>
|
160
|
+
|
161
|
+
<h2 id="SYNTAX">SYNTAX</h2>
|
162
|
+
|
163
|
+
<p>A cookbook version constraint is comprised of a <em>cookbook name</em> and a
|
164
|
+
<em>version constraint</em>. The <em>cookbook name</em> is the name of a cookbook in
|
165
|
+
your system, and the <em>version constraint</em> is a String describing the
|
166
|
+
version(s) of that cookbook allowed in the environment. Only one
|
167
|
+
<em>version constraint</em> is supported for a given <em>cookbook name</em>.</p>
|
168
|
+
|
169
|
+
<p>The exact syntax used to define a cookbook version constraint varies
|
170
|
+
depending on whether you use the JSON format or the Ruby format. In the
|
171
|
+
JSON format, the cookbook version constraints for an environment are
|
172
|
+
represented as a single JSON object, like this:</p>
|
173
|
+
|
174
|
+
<pre><code>{"apache2": ">= 1.5.0"}
|
175
|
+
</code></pre>
|
176
|
+
|
177
|
+
<p>In the Ruby format, the cookbook version contraints for an environment
|
178
|
+
are represented as a Ruby Hash, like this:</p>
|
179
|
+
|
180
|
+
<pre><code>{"apache2" => ">= 1.5.0"}
|
181
|
+
</code></pre>
|
182
|
+
|
183
|
+
<p>A <em>version number</em> is a String comprised of two or three digits
|
184
|
+
separated by a dot (.) character, or in other words, strings of the form
|
185
|
+
"major.minor" or "major.minor.patch". "1.2" and "1.2.3" are examples of
|
186
|
+
valid version numbers. Version numbers containing more than three digits
|
187
|
+
or alphabetic characters are not supported.</p>
|
188
|
+
|
189
|
+
<p>A <em>version constraint</em> String is composed of an <em>operator</em> and a
|
190
|
+
<em>version number</em>. The following operators are available:</p>
|
191
|
+
|
192
|
+
<dl>
|
193
|
+
<dt><code>= VERSION</code></dt><dd>Equality. Only the exact version specified may be used.</dd>
|
194
|
+
<dt><code>> VERSION</code></dt><dd>Greater than. Only versions greater than <code>VERSION</code> may be used.</dd>
|
195
|
+
<dt><code>>= VERSION</code></dt><dd>Greater than or equal to. Only versions equal to VERSION or greater
|
196
|
+
may be used.</dd>
|
197
|
+
<dt><code>< VERSION</code></dt><dd>Less than. Only versions less than VERSION may be used.</dd>
|
198
|
+
<dt><code><= VERSION</code></dt><dd>Less than or equal to. Only versions lesser or equal to VERSION may
|
199
|
+
be used.</dd>
|
200
|
+
<dt><code>~> VERSION</code></dt><dd>Pessimistic greater than. Depending on the number of components in
|
201
|
+
the given VERSION, the constraint will be optimistic about future
|
202
|
+
minor or patch revisions only. For example, <code>~> 1.1</code> will match any
|
203
|
+
version less than <code>2.0</code> and greater than or equal to <code>1.1.0</code>,
|
204
|
+
whereas <code>~> 2.0.5</code> will match any version less than <code>2.1.0</code> and
|
205
|
+
greater than or equal to <code>2.0.5</code>.</dd>
|
206
|
+
</dl>
|
207
|
+
|
208
|
+
|
209
|
+
<h2 id="FORMAT">FORMAT</h2>
|
210
|
+
|
211
|
+
<p>The JSON format of an envioronment is as follows:</p>
|
212
|
+
|
213
|
+
<pre><code>{
|
214
|
+
"name": "dev",
|
215
|
+
"description": "The development environment",
|
216
|
+
"cookbook_versions": {
|
217
|
+
"couchdb": "= 11.0.0"
|
218
|
+
},
|
219
|
+
"json_class": "Chef::Environment",
|
220
|
+
"chef_type": "environment",
|
221
|
+
"default_attributes": {
|
222
|
+
"apache2": { "listen_ports": [ "80", "443" ] }
|
223
|
+
},
|
224
|
+
"override_attributes": {
|
225
|
+
"aws_s3_bucket": "production"
|
226
|
+
}
|
227
|
+
}
|
228
|
+
</code></pre>
|
229
|
+
|
230
|
+
<p>The Ruby format of an environment is as follows:</p>
|
231
|
+
|
232
|
+
<pre><code>name "dev"
|
233
|
+
description "The development environment"
|
234
|
+
cookbook_versions "couchdb" => "= 11.0.0"
|
235
|
+
default_attributes "apache2" => { "listen_ports" => [ "80", "443" ] }
|
236
|
+
override_attributes "aws_s3_bucket" => "production"
|
237
|
+
</code></pre>
|
238
|
+
|
239
|
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
240
|
+
|
241
|
+
<p> <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-cookbook<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-role<span class="s">(1)</span></span></strong>
|
242
|
+
<a href="http://wiki.opscode.com/display/chef/Environments" data-bare-link="true">http://wiki.opscode.com/display/chef/Environments</a>
|
243
|
+
<a href="http://wiki.opscode.com/display/chef/Version+Constraints" data-bare-link="true">http://wiki.opscode.com/display/chef/Version+Constraints</a></p>
|
244
|
+
|
245
|
+
<h2 id="AUTHOR">AUTHOR</h2>
|
246
|
+
|
247
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
248
|
+
|
249
|
+
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
250
|
+
|
251
|
+
<p> This manual page was written by Daniel DeLeo <a href="mailto:dan@opscode.com" data-bare-link="true">dan@opscode.com</a>.
|
252
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
253
|
+
|
254
|
+
<h2 id="CHEF">CHEF</h2>
|
255
|
+
|
256
|
+
<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
|
83
257
|
|
84
258
|
|
85
259
|
<ol class='man-decor man-foot man foot'>
|
86
|
-
<li class='tl'>Chef 0.10.0.beta.
|
260
|
+
<li class='tl'>Chef 0.10.0.beta.9</li>
|
87
261
|
<li class='tc'>April 2011</li>
|
88
262
|
<li class='tr'>knife-environment(1)</li>
|
89
263
|
</ol>
|
@@ -61,7 +61,12 @@
|
|
61
61
|
<div class='man-navigation' style='display:none'>
|
62
62
|
<a href="#NAME">NAME</a>
|
63
63
|
<a href="#SYNOPSIS">SYNOPSIS</a>
|
64
|
-
<a href="#
|
64
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
65
|
+
<a href="#EXAMPLES">EXAMPLES</a>
|
66
|
+
<a href="#SEE-ALSO">SEE ALSO</a>
|
67
|
+
<a href="#AUTHOR">AUTHOR</a>
|
68
|
+
<a href="#DOCUMENTATION">DOCUMENTATION</a>
|
69
|
+
<a href="#CHEF">CHEF</a>
|
65
70
|
</div>
|
66
71
|
|
67
72
|
<ol class='man-decor man-head man head'>
|
@@ -79,11 +84,47 @@
|
|
79
84
|
|
80
85
|
<p><strong>knife</strong> <strong>exec</strong> <em>(options)</em></p>
|
81
86
|
|
82
|
-
<
|
87
|
+
<dl>
|
88
|
+
<dt><code>-E</code>, <code>--exec CODE</code></dt><dd>Provide a snippet of code to evaluate on the command line</dd>
|
89
|
+
</dl>
|
90
|
+
|
91
|
+
|
92
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
93
|
+
|
94
|
+
<p><code>knife exec</code> runs arbitrary ruby scripts in a context similar to that of
|
95
|
+
the <span class="man-ref">shef<span class="s">(1)</span></span> DSL. See the shef documentation for a description of the
|
96
|
+
commands available.</p>
|
97
|
+
|
98
|
+
<h2 id="EXAMPLES">EXAMPLES</h2>
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Make an API call against an arbitrary endpoint</dt><dd>knife exec -E 'api.get("nodes/fluke.localdomain/cookbooks")'<br />
|
102
|
+
=> list of cookbooks for the node <em>fluke.localdomain</em></dd>
|
103
|
+
<dt>Remove the role <em>obsolete</em> from all nodes</dt><dd>knife exec -E 'nodes.transform(:all){|n| n.run_list.delete("role[obsolete]")}'</dd>
|
104
|
+
<dt>Generate the expanded run list for hosts in the <code>webserver</code> role</dt><dd>knife exec -E 'nodes.find(:roles => "webserver") {|n| n.expand!; n[:recipes]}'</dd>
|
105
|
+
</dl>
|
106
|
+
|
107
|
+
|
108
|
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
109
|
+
|
110
|
+
<p> <strong><span class="man-ref">shef<span class="s">(1)</span></span></strong></p>
|
111
|
+
|
112
|
+
<h2 id="AUTHOR">AUTHOR</h2>
|
113
|
+
|
114
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
115
|
+
|
116
|
+
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
117
|
+
|
118
|
+
<p> This manual page was written by Joshua Timberman <a href="mailto:joshua@opscode.com" data-bare-link="true">joshua@opscode.com</a>.
|
119
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
120
|
+
|
121
|
+
<h2 id="CHEF">CHEF</h2>
|
122
|
+
|
123
|
+
<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
|
83
124
|
|
84
125
|
|
85
126
|
<ol class='man-decor man-foot man foot'>
|
86
|
-
<li class='tl'>Chef 0.10.0.beta.
|
127
|
+
<li class='tl'>Chef 0.10.0.beta.9</li>
|
87
128
|
<li class='tc'>April 2011</li>
|
88
129
|
<li class='tr'>knife-exec(1)</li>
|
89
130
|
</ol>
|
@@ -115,7 +115,7 @@ time for all objects to be indexed and available for search.</p>
|
|
115
115
|
|
116
116
|
|
117
117
|
<ol class='man-decor man-foot man foot'>
|
118
|
-
<li class='tl'>Chef 0.10.0.beta.
|
118
|
+
<li class='tl'>Chef 0.10.0.beta.9</li>
|
119
119
|
<li class='tc'>April 2011</li>
|
120
120
|
<li class='tr'>knife-index(1)</li>
|
121
121
|
</ol>
|
@@ -119,6 +119,8 @@ settings.</p>
|
|
119
119
|
|
120
120
|
<h2 id="NODE-SUB-COMMANDS">NODE SUB-COMMANDS</h2>
|
121
121
|
|
122
|
+
<p>The following <code>node</code> subcommands are available:</p>
|
123
|
+
|
122
124
|
<h2 id="BULK-DELETE">BULK DELETE</h2>
|
123
125
|
|
124
126
|
<p><strong>knife node bulk delete</strong> <em>regex</em> <em>(options)</em></p>
|
@@ -245,11 +247,11 @@ run list, the correct syntax is "role[ROLE_NAME]"</p>
|
|
245
247
|
|
246
248
|
<h2 id="AUTHOR">AUTHOR</h2>
|
247
249
|
|
248
|
-
<p> Chef was written by Adam Jacob <a href="&#
|
250
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
249
251
|
|
250
252
|
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
251
253
|
|
252
|
-
<p> This manual page was written by Joshua Timberman <a href="&#
|
254
|
+
<p> This manual page was written by Joshua Timberman <a href="mailto:joshua@opscode.com" data-bare-link="true">joshua@opscode.com</a>.
|
253
255
|
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
254
256
|
|
255
257
|
<h2 id="CHEF">CHEF</h2>
|
@@ -258,7 +260,7 @@ run list, the correct syntax is "role[ROLE_NAME]"</p>
|
|
258
260
|
|
259
261
|
|
260
262
|
<ol class='man-decor man-foot man foot'>
|
261
|
-
<li class='tl'>Chef 0.10.0.beta.
|
263
|
+
<li class='tl'>Chef 0.10.0.beta.9</li>
|
262
264
|
<li class='tc'>April 2011</li>
|
263
265
|
<li class='tr'>knife-node(1)</li>
|
264
266
|
</ol>
|
@@ -62,6 +62,18 @@
|
|
62
62
|
<a href="#NAME">NAME</a>
|
63
63
|
<a href="#SYNOPSIS">SYNOPSIS</a>
|
64
64
|
<a href="#ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</a>
|
65
|
+
<a href="#LIST">LIST</a>
|
66
|
+
<a href="#SHOW">SHOW</a>
|
67
|
+
<a href="#CREATE">CREATE</a>
|
68
|
+
<a href="#EDIT">EDIT</a>
|
69
|
+
<a href="#FROM-FILE">FROM FILE</a>
|
70
|
+
<a href="#DELETE">DELETE</a>
|
71
|
+
<a href="#BULK-DELETE">BULK DELETE</a>
|
72
|
+
<a href="#DESCRIPTION">DESCRIPTION</a>
|
73
|
+
<a href="#SEE-ALSO">SEE ALSO</a>
|
74
|
+
<a href="#AUTHOR">AUTHOR</a>
|
75
|
+
<a href="#DOCUMENTATION">DOCUMENTATION</a>
|
76
|
+
<a href="#CHEF">CHEF</a>
|
65
77
|
</div>
|
66
78
|
|
67
79
|
<ol class='man-decor man-head man head'>
|
@@ -81,11 +93,33 @@
|
|
81
93
|
|
82
94
|
<h2 id="ROLE-SUB-COMMANDS">ROLE SUB-COMMANDS</h2>
|
83
95
|
|
84
|
-
<p
|
96
|
+
<p>The following <code>role</code> subcommands are available:</p>
|
85
97
|
|
86
|
-
<
|
98
|
+
<h2 id="LIST">LIST</h2>
|
87
99
|
|
88
|
-
<p><strong>role
|
100
|
+
<p><strong>knife role list</strong> <em>(options)</em></p>
|
101
|
+
|
102
|
+
<dl>
|
103
|
+
<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
|
104
|
+
</dl>
|
105
|
+
|
106
|
+
|
107
|
+
<p>List roles.</p>
|
108
|
+
|
109
|
+
<h2 id="SHOW">SHOW</h2>
|
110
|
+
|
111
|
+
<p><strong>knife role show ROLE</strong> <em>(options)</em></p>
|
112
|
+
|
113
|
+
<dl>
|
114
|
+
<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
|
115
|
+
</dl>
|
116
|
+
|
117
|
+
|
118
|
+
<p>Show a specific role.</p>
|
119
|
+
|
120
|
+
<h2 id="CREATE">CREATE</h2>
|
121
|
+
|
122
|
+
<p><strong>knife role create ROLE</strong> <em>(options)</em></p>
|
89
123
|
|
90
124
|
<dl>
|
91
125
|
<dt><code>-d</code>, <code>--description</code></dt><dd>The role description</dd>
|
@@ -94,39 +128,69 @@
|
|
94
128
|
|
95
129
|
<p>Create a new role.</p>
|
96
130
|
|
97
|
-
<
|
98
|
-
|
99
|
-
<p>Delete a role.</p>
|
131
|
+
<h2 id="EDIT">EDIT</h2>
|
100
132
|
|
101
|
-
<p><strong>role edit ROLE</strong> <em>(options)</em></p>
|
133
|
+
<p><strong>knife role edit ROLE</strong> <em>(options)</em></p>
|
102
134
|
|
103
135
|
<p>Edit a role.</p>
|
104
136
|
|
105
|
-
<
|
137
|
+
<h2 id="FROM-FILE">FROM FILE</h2>
|
138
|
+
|
139
|
+
<p><strong>knife role from file FILE</strong> <em>(options)</em></p>
|
106
140
|
|
107
141
|
<p>Create or update a role from a role Ruby DSL (<code>.rb</code>) or JSON file.</p>
|
108
142
|
|
109
|
-
<
|
143
|
+
<h2 id="DELETE">DELETE</h2>
|
110
144
|
|
111
|
-
<
|
112
|
-
<dt><code>-w</code>, <code>--with-uri</code></dt><dd>Show corresponding URIs</dd>
|
113
|
-
</dl>
|
145
|
+
<p><strong>knife role delete ROLE</strong> <em>(options)</em></p>
|
114
146
|
|
147
|
+
<p>Delete a role.</p>
|
115
148
|
|
116
|
-
<
|
149
|
+
<h2 id="BULK-DELETE">BULK DELETE</h2>
|
117
150
|
|
118
|
-
<p><strong>role
|
151
|
+
<p><strong>knife role bulk delete REGEX</strong> <em>(options)</em></p>
|
119
152
|
|
120
|
-
<
|
121
|
-
<dt><code>-a</code>, <code>--attribute ATTR</code></dt><dd>Show only one attribute</dd>
|
122
|
-
</dl>
|
153
|
+
<p>Delete roles on the Chef Server based on a regular expression. The regular expression (<em>REGEX</em>) should be in quotes, not in //'s.</p>
|
123
154
|
|
155
|
+
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
124
156
|
|
125
|
-
<p>
|
157
|
+
<p>Roles provide a mechanism to group repeated configuration settings.
|
158
|
+
Roles are data structures that contain <strong>default_attributes</strong>, and
|
159
|
+
<strong>override_attributes</strong>, which are nested hashes of configuration
|
160
|
+
settings, and a <strong>run_list</strong>, which is an ordered list of recipes and
|
161
|
+
roles that should be applied to a host by chef-client.</p>
|
162
|
+
|
163
|
+
<p><strong>default_attributes</strong> will be overridden if they conflict with a value
|
164
|
+
on a node that includes the role. Conversely, <strong>override_attributes</strong>
|
165
|
+
will override any values set on nodes that apply them.</p>
|
166
|
+
|
167
|
+
<p>When <strong>chef-client</strong>(8) configures a host, it will "expand" the
|
168
|
+
<strong>run_list</strong> included in that host's node data. The expansion process
|
169
|
+
will recursively replace any roles in the run_list with that role's
|
170
|
+
run_list.</p>
|
171
|
+
|
172
|
+
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
173
|
+
|
174
|
+
<p> <strong><span class="man-ref">knife-node<span class="s">(1)</span></span></strong> <strong><span class="man-ref">knife-environment<span class="s">(1)</span></span></strong>
|
175
|
+
<a href="http://wiki.opscode.com/display/chef/Roles" data-bare-link="true">http://wiki.opscode.com/display/chef/Roles</a>
|
176
|
+
<a href="http://wiki.opscode.com/display/chef/Attributes" data-bare-link="true">http://wiki.opscode.com/display/chef/Attributes</a></p>
|
177
|
+
|
178
|
+
<h2 id="AUTHOR">AUTHOR</h2>
|
179
|
+
|
180
|
+
<p> Chef was written by Adam Jacob <a href="mailto:adam@opscode.com" data-bare-link="true">adam@opscode.com</a> with many contributions from the community.</p>
|
181
|
+
|
182
|
+
<h2 id="DOCUMENTATION">DOCUMENTATION</h2>
|
183
|
+
|
184
|
+
<p> This manual page was written by Joshua Timberman <a href="mailto:joshua@opscode.com" data-bare-link="true">joshua@opscode.com</a>.
|
185
|
+
Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.</p>
|
186
|
+
|
187
|
+
<h2 id="CHEF">CHEF</h2>
|
188
|
+
|
189
|
+
<p> Knife is distributed with Chef. <a href="http://wiki.opscode.com/display/chef/Home" data-bare-link="true">http://wiki.opscode.com/display/chef/Home</a></p>
|
126
190
|
|
127
191
|
|
128
192
|
<ol class='man-decor man-foot man foot'>
|
129
|
-
<li class='tl'>Chef 0.10.0.beta.
|
193
|
+
<li class='tl'>Chef 0.10.0.beta.9</li>
|
130
194
|
<li class='tc'>April 2011</li>
|
131
195
|
<li class='tr'>knife-role(1)</li>
|
132
196
|
</ol>
|