summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distro/common/html/knife_search.html14
-rw-r--r--distro/common/man/man1/knife-search.112
-rw-r--r--distro/common/markdown/man1/knife-search.mkd4
3 files changed, 15 insertions, 15 deletions
diff --git a/distro/common/html/knife_search.html b/distro/common/html/knife_search.html
index c5006d155e..22d69b11d7 100644
--- a/distro/common/html/knife_search.html
+++ b/distro/common/html/knife_search.html
@@ -51,7 +51,7 @@
</div>
<p>where <tt class="docutils literal"><span class="pre">INDEX</span></tt> is one of <tt class="docutils literal"><span class="pre">client</span></tt>, <tt class="docutils literal"><span class="pre">environment</span></tt>, <tt class="docutils literal"><span class="pre">node</span></tt>, <tt class="docutils literal"><span class="pre">role</span></tt>, or the name of a data bag and <tt class="docutils literal"><span class="pre">SEARCH_QUERY</span></tt> is the search query syntax for the query that will be executed.</p>
<p><tt class="docutils literal"><span class="pre">INDEX</span></tt> is implied if omitted, and will default to <tt class="docutils literal"><span class="pre">node</span></tt>. For example:</p>
-<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search <span class="s1">&#39;*:*&#39;</span> -i
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search <span class="s1">&quot;*:*&quot;</span> -i
</pre></div>
</div>
<p>will return something similar to:</p>
@@ -68,7 +68,7 @@ win2k8-dev
</pre></div>
</div>
<p>and is the same search as:</p>
-<div class="highlight-bash"><div class="highlight"><pre>$ knife search node &#39;*:*&quot; -i
+<div class="highlight-bash"><div class="highlight"><pre>$ knife search node &quot;*:*&quot; -i
</pre></div>
</div>
<p>If the <tt class="docutils literal"><span class="pre">SEARCH_QUERY</span></tt> does not contain a colon character (<tt class="docutils literal"><span class="pre">:</span></tt>), then the default query pattern is <tt class="docutils literal"><span class="pre">tags:*#{&#64;query}*</span> <span class="pre">OR</span> <span class="pre">roles:*#{&#64;query}*</span> <span class="pre">OR</span> <span class="pre">fqdn:*#{&#64;query}*</span> <span class="pre">OR</span> <span class="pre">addresses:*#{&#64;query}*</span></tt>, which means the following two search queries are effectively the same:</p>
@@ -117,7 +117,7 @@ win2k8-dev
<p>The following examples show how to use this knife subcommand:</p>
<p><strong>Search by platform ID</strong></p>
<p>To search for the IDs of all nodes running on the Amazon EC2 platform, enter:</p>
-<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&#39;ec2:*&#39;</span> -i
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&quot;ec2:*&quot;</span> -i
</pre></div>
</div>
<p>to return something like:</p>
@@ -134,7 +134,7 @@ ip-0A7CFFD5.ec2.internal
</div>
<p><strong>Search by instance type</strong></p>
<p>To search for the instance type (flavor) of all nodes running on the Amazon EC2 platform, enter:</p>
-<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&#39;ec2:*&#39;</span> -a ec2.instance_type
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&quot;ec2:*&quot;</span> -a ec2.instance_type
</pre></div>
</div>
<p>to return something like:</p>
@@ -155,12 +155,12 @@ id: ip-0A7CFFD5.ec2.internal
</div>
<p><strong>Search by node</strong></p>
<p>To search for all nodes running Ubuntu, enter:</p>
-<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&#39;platform:ubuntu&#39;</span>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&quot;platform:ubuntu&quot;</span>
</pre></div>
</div>
<p><strong>Search by node and environment</strong></p>
<p>To search for all nodes running CentOS in the production environment, enter:</p>
-<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&#39;chef_environment:production AND platform:centos&#39;</span>
+<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife search node <span class="s1">&quot;chef_environment:production AND platform:centos&quot;</span>
</pre></div>
</div>
<p><strong>Search for nested attributes</strong></p>
@@ -200,4 +200,4 @@ id: ip-0A7CFFD5.ec2.internal
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/distro/common/man/man1/knife-search.1 b/distro/common/man/man1/knife-search.1
index 3b81898530..0b87c2d817 100644
--- a/distro/common/man/man1/knife-search.1
+++ b/distro/common/man/man1/knife-search.1
@@ -57,7 +57,7 @@ where \fBINDEX\fP is one of \fBclient\fP, \fBenvironment\fP, \fBnode\fP, \fBrole
.sp
.nf
.ft C
-$ knife search \(aq*:*\(aq \-i
+$ knife search "*:*" \-i
.ft P
.fi
.UNINDENT
@@ -90,7 +90,7 @@ and is the same search as:
.sp
.nf
.ft C
-$ knife search node \(aq*:*" \-i
+$ knife search node "*:*" \-i
.ft P
.fi
.UNINDENT
@@ -218,7 +218,7 @@ To search for the IDs of all nodes running on the Amazon EC2 platform, enter:
.sp
.nf
.ft C
-$ knife search node \(aqec2:*\(aq \-i
+$ knife search node "ec2:*" \-i
.ft P
.fi
.UNINDENT
@@ -250,7 +250,7 @@ To search for the instance type (flavor) of all nodes running on the Amazon EC2
.sp
.nf
.ft C
-$ knife search node \(aqec2:*\(aq \-a ec2.instance_type
+$ knife search node "ec2:*" \-a ec2.instance_type
.ft P
.fi
.UNINDENT
@@ -286,7 +286,7 @@ To search for all nodes running Ubuntu, enter:
.sp
.nf
.ft C
-$ knife search node \(aqplatform:ubuntu\(aq
+$ knife search node "platform:ubuntu"
.ft P
.fi
.UNINDENT
@@ -298,7 +298,7 @@ To search for all nodes running CentOS in the production environment, enter:
.sp
.nf
.ft C
-$ knife search node \(aqchef_environment:production AND platform:centos\(aq
+$ knife search node "chef_environment:production AND platform:centos"
.ft P
.fi
.UNINDENT
diff --git a/distro/common/markdown/man1/knife-search.mkd b/distro/common/markdown/man1/knife-search.mkd
index b289b2c83b..31a1d6e0f1 100644
--- a/distro/common/markdown/man1/knife-search.mkd
+++ b/distro/common/markdown/man1/knife-search.mkd
@@ -50,7 +50,7 @@ query syntax. The following data types are indexed for search:
Data bags are indexed by the data bag's name. For example, to search a
data bag named "admins":
- knife search admins "field:search_pattern"
+ knife search admins 'field:search_pattern'
## QUERY SYNTAX
@@ -95,7 +95,7 @@ within a search pattern.
Range searches allows one to match values between two given values. To
match values between X and Y, inclusively, use square brackets:
- knife search INDEX 'field:[X TO Y]
+ knife search INDEX 'field:[X TO Y]'
To match values between X and Y, exclusively, use curly brackets: