Sha256: eef336453f2087422e434a07b414a34b063c5dfd408e2cd992db5d6a683b44bf

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "KNIFE\-EXEC" "1" "August 2014" "Chef 10.34.2" "Chef Manual"
.
.SH "NAME"
\fBknife\-exec\fR \- Run user scripts using the Chef API DSL
.
.SH "SYNOPSIS"
\fBknife\fR \fBexec\fR \fI(options)\fR
.
.TP
\fB\-E\fR, \fB\-\-exec CODE\fR
Provide a snippet of code to evaluate on the command line
.
.SH "DESCRIPTION"
\fBknife exec\fR runs arbitrary ruby scripts in a context similar to that of the shef(1) DSL\. See the shef documentation for a description of the commands available\.
.
.SH "EXAMPLES"
.
.TP
Make an API call against an arbitrary endpoint
knife exec \-E \'api\.get("nodes/fluke\.localdomain/cookbooks")\'
.
.br
=> list of cookbooks for the node \fIfluke\.localdomain\fR
.
.TP
Remove the role \fIobsolete\fR from all nodes
knife exec \-E \'nodes\.transform(:all){|n| n\.run_list\.delete("role[obsolete]")}\'
.
.TP
Generate the expanded run list for hosts in the \fBwebserver\fR role
knife exec \-E \'nodes\.find(:roles => "webserver") {|n| n\.expand!; n[:recipes]}\'
.
.SH "SEE ALSO"
\fBshef(1)\fR
.
.SH "AUTHOR"
Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
.
.SH "DOCUMENTATION"
This manual page was written by Joshua Timberman \fIjoshua@opscode\.com\fR\. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2\.0 License\.
.
.SH "CHEF"
Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chef-10.34.4 distro/common/man/man1/knife-exec.1
chef-10.34.4-x86-mingw32 distro/common/man/man1/knife-exec.1
chef-10.34.2-x86-mingw32 distro/common/man/man1/knife-exec.1
chef-10.34.2 distro/common/man/man1/knife-exec.1