chef 13.11.3-universal-mingw32 → 13.12.3-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -3
  3. data/README.md +35 -40
  4. data/Rakefile +18 -22
  5. data/chef-universal-mingw32.gemspec +1 -1
  6. data/chef.gemspec +3 -3
  7. data/lib/chef/client.rb +1 -1
  8. data/lib/chef/mixin/params_validate.rb +3 -1
  9. data/lib/chef/provider/script.rb +2 -2
  10. data/lib/chef/version.rb +1 -1
  11. data/spec/functional/http/simple_spec.rb +12 -6
  12. data/spec/functional/resource/remote_file_spec.rb +19 -15
  13. data/spec/support/platform_helpers.rb +2 -1
  14. data/tasks/announce.rb +1 -1
  15. data/tasks/dependencies.rb +5 -39
  16. data/tasks/maintainers.rb +10 -10
  17. data/tasks/rspec.rb +2 -2
  18. data/tasks/templates/prerelease.md.erb +11 -2
  19. data/tasks/templates/release.md.erb +9 -1
  20. metadata +6 -247
  21. data/CONTRIBUTING.md +0 -151
  22. data/VERSION +0 -1
  23. data/acceptance/.gitignore +0 -3
  24. data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +0 -33
  25. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +0 -283
  26. data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +0 -59
  27. data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +0 -68
  28. data/acceptance/.shared/kitchen_acceptance/metadata.rb +0 -1
  29. data/acceptance/Gemfile +0 -19
  30. data/acceptance/Gemfile.lock +0 -266
  31. data/acceptance/README.md +0 -137
  32. data/acceptance/basics/.acceptance/acceptance-cookbook/.gitignore +0 -2
  33. data/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  34. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  35. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  36. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  37. data/acceptance/basics/.kitchen.yml +0 -4
  38. data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +0 -19
  39. data/acceptance/basics/test/integration/chef-current-install/serverspec/spec_helper.rb +0 -6
  40. data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +0 -8
  41. data/acceptance/data-collector/.acceptance/acceptance-cookbook/.gitignore +0 -2
  42. data/acceptance/data-collector/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  43. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -2
  44. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -2
  45. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -2
  46. data/acceptance/data-collector/.acceptance/data-collector-test/.gitignore +0 -16
  47. data/acceptance/data-collector/.acceptance/data-collector-test/Berksfile +0 -3
  48. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/api.rb +0 -101
  49. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/apigemfile +0 -3
  50. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-both-mode.rb +0 -4
  51. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-client-mode.rb +0 -4
  52. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-no-endpoint.rb +0 -2
  53. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-solo-mode.rb +0 -4
  54. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/config.ru +0 -2
  55. data/acceptance/data-collector/.acceptance/data-collector-test/metadata.rb +0 -7
  56. data/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb +0 -44
  57. data/acceptance/data-collector/.kitchen.yml +0 -9
  58. data/acceptance/data-collector/Berksfile +0 -3
  59. data/acceptance/data-collector/test/integration/default/serverspec/default_spec.rb +0 -208
  60. data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +0 -8
  61. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/.gitignore +0 -2
  62. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/metadata.rb +0 -1
  63. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  64. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  65. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -61
  66. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/.gitignore +0 -2
  67. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb +0 -43
  68. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +0 -41
  69. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/metadata.rb +0 -3
  70. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  71. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  72. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  73. data/acceptance/top-cookbooks/.gitignore +0 -1
  74. data/acceptance/top-cookbooks/.kitchen.chocolatey.yml +0 -6
  75. data/acceptance/top-cookbooks/.kitchen.iis.yml +0 -4
  76. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +0 -7
  77. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +0 -7
  78. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +0 -7
  79. data/acceptance/top-cookbooks/.kitchen.powershell.yml +0 -4
  80. data/acceptance/top-cookbooks/.kitchen.sql_server.yml +0 -5
  81. data/acceptance/top-cookbooks/.kitchen.winbox.yml +0 -8
  82. data/acceptance/top-cookbooks/.kitchen.windows.yml +0 -38
  83. data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +0 -2
  84. data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  85. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  86. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  87. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  88. data/acceptance/trivial/.kitchen.yml +0 -7
  89. data/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb +0 -5
  90. data/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore +0 -2
  91. data/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +0 -2
  92. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb +0 -1
  93. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb +0 -1
  94. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb +0 -1
  95. data/acceptance/windows-service/.kitchen.yml +0 -7
  96. data/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +0 -58
  97. data/distro/common/html/_sources/ctl_chef_client.txt +0 -36
  98. data/distro/common/html/_sources/ctl_chef_server.txt +0 -341
  99. data/distro/common/html/_sources/ctl_chef_shell.txt +0 -15
  100. data/distro/common/html/_sources/ctl_chef_solo.txt +0 -25
  101. data/distro/common/html/_sources/index.txt +0 -135
  102. data/distro/common/html/_sources/knife.txt +0 -74
  103. data/distro/common/html/_sources/knife_bootstrap.txt +0 -56
  104. data/distro/common/html/_sources/knife_client.txt +0 -151
  105. data/distro/common/html/_sources/knife_common_options.txt +0 -6
  106. data/distro/common/html/_sources/knife_configure.txt +0 -29
  107. data/distro/common/html/_sources/knife_cookbook.txt +0 -236
  108. data/distro/common/html/_sources/knife_cookbook_site.txt +0 -157
  109. data/distro/common/html/_sources/knife_data_bag.txt +0 -160
  110. data/distro/common/html/_sources/knife_delete.txt +0 -26
  111. data/distro/common/html/_sources/knife_deps.txt +0 -61
  112. data/distro/common/html/_sources/knife_diff.txt +0 -34
  113. data/distro/common/html/_sources/knife_download.txt +0 -44
  114. data/distro/common/html/_sources/knife_edit.txt +0 -26
  115. data/distro/common/html/_sources/knife_environment.txt +0 -158
  116. data/distro/common/html/_sources/knife_exec.txt +0 -47
  117. data/distro/common/html/_sources/knife_index_rebuild.txt +0 -21
  118. data/distro/common/html/_sources/knife_list.txt +0 -33
  119. data/distro/common/html/_sources/knife_node.txt +0 -250
  120. data/distro/common/html/_sources/knife_raw.txt +0 -35
  121. data/distro/common/html/_sources/knife_recipe_list.txt +0 -23
  122. data/distro/common/html/_sources/knife_role.txt +0 -157
  123. data/distro/common/html/_sources/knife_search.txt +0 -53
  124. data/distro/common/html/_sources/knife_serve.txt +0 -19
  125. data/distro/common/html/_sources/knife_show.txt +0 -27
  126. data/distro/common/html/_sources/knife_ssh.txt +0 -43
  127. data/distro/common/html/_sources/knife_ssl_check.txt +0 -41
  128. data/distro/common/html/_sources/knife_ssl_fetch.txt +0 -41
  129. data/distro/common/html/_sources/knife_status.txt +0 -37
  130. data/distro/common/html/_sources/knife_tag.txt +0 -69
  131. data/distro/common/html/_sources/knife_upload.txt +0 -49
  132. data/distro/common/html/_sources/knife_user.txt +0 -127
  133. data/distro/common/html/_sources/knife_using.txt +0 -43
  134. data/distro/common/html/_sources/knife_xargs.txt +0 -30
  135. data/distro/common/html/_static/ajax-loader.gif +0 -0
  136. data/distro/common/html/_static/basic.css +0 -537
  137. data/distro/common/html/_static/chef.ico +0 -0
  138. data/distro/common/html/_static/chef_html_logo.png +0 -0
  139. data/distro/common/html/_static/comment-bright.png +0 -0
  140. data/distro/common/html/_static/comment-close.png +0 -0
  141. data/distro/common/html/_static/comment.png +0 -0
  142. data/distro/common/html/_static/contents.png +0 -0
  143. data/distro/common/html/_static/doctools.js +0 -238
  144. data/distro/common/html/_static/down-pressed.png +0 -0
  145. data/distro/common/html/_static/down.png +0 -0
  146. data/distro/common/html/_static/file.png +0 -0
  147. data/distro/common/html/_static/guide.css +0 -505
  148. data/distro/common/html/_static/jquery.js +0 -2
  149. data/distro/common/html/_static/minus.png +0 -0
  150. data/distro/common/html/_static/navigation.png +0 -0
  151. data/distro/common/html/_static/plus.png +0 -0
  152. data/distro/common/html/_static/pygments.css +0 -62
  153. data/distro/common/html/_static/searchtools.js +0 -622
  154. data/distro/common/html/_static/underscore.js +0 -31
  155. data/distro/common/html/_static/up-pressed.png +0 -0
  156. data/distro/common/html/_static/up.png +0 -0
  157. data/distro/common/html/_static/websupport.js +0 -808
  158. data/distro/common/html/ctl_chef_client.html +0 -270
  159. data/distro/common/html/ctl_chef_server.html +0 -728
  160. data/distro/common/html/ctl_chef_shell.html +0 -163
  161. data/distro/common/html/ctl_chef_solo.html +0 -194
  162. data/distro/common/html/index.html +0 -202
  163. data/distro/common/html/knife.html +0 -170
  164. data/distro/common/html/knife_bootstrap.html +0 -285
  165. data/distro/common/html/knife_client.html +0 -285
  166. data/distro/common/html/knife_common_options.html +0 -96
  167. data/distro/common/html/knife_configure.html +0 -105
  168. data/distro/common/html/knife_cookbook.html +0 -487
  169. data/distro/common/html/knife_cookbook_site.html +0 -375
  170. data/distro/common/html/knife_data_bag.html +0 -374
  171. data/distro/common/html/knife_delete.html +0 -93
  172. data/distro/common/html/knife_deps.html +0 -143
  173. data/distro/common/html/knife_diff.html +0 -123
  174. data/distro/common/html/knife_download.html +0 -145
  175. data/distro/common/html/knife_edit.html +0 -89
  176. data/distro/common/html/knife_environment.html +0 -322
  177. data/distro/common/html/knife_exec.html +0 -220
  178. data/distro/common/html/knife_index_rebuild.html +0 -83
  179. data/distro/common/html/knife_list.html +0 -114
  180. data/distro/common/html/knife_node.html +0 -458
  181. data/distro/common/html/knife_raw.html +0 -110
  182. data/distro/common/html/knife_recipe_list.html +0 -91
  183. data/distro/common/html/knife_role.html +0 -295
  184. data/distro/common/html/knife_search.html +0 -203
  185. data/distro/common/html/knife_serve.html +0 -79
  186. data/distro/common/html/knife_show.html +0 -104
  187. data/distro/common/html/knife_ssh.html +0 -177
  188. data/distro/common/html/knife_ssl_check.html +0 -151
  189. data/distro/common/html/knife_ssl_fetch.html +0 -151
  190. data/distro/common/html/knife_status.html +0 -144
  191. data/distro/common/html/knife_tag.html +0 -138
  192. data/distro/common/html/knife_upload.html +0 -153
  193. data/distro/common/html/knife_user.html +0 -242
  194. data/distro/common/html/knife_using.html +0 -210
  195. data/distro/common/html/knife_xargs.html +0 -122
  196. data/distro/common/html/objects.inv +0 -0
  197. data/distro/common/html/search.html +0 -82
  198. data/distro/common/html/searchindex.js +0 -1
  199. data/distro/common/man/man1/README.md +0 -58
  200. data/distro/common/man/man1/chef-shell.1 +0 -194
  201. data/distro/common/man/man1/knife-bootstrap.1 +0 -215
  202. data/distro/common/man/man1/knife-client.1 +0 -443
  203. data/distro/common/man/man1/knife-configure.1 +0 -161
  204. data/distro/common/man/man1/knife-cookbook-site.1 +0 -552
  205. data/distro/common/man/man1/knife-cookbook.1 +0 -770
  206. data/distro/common/man/man1/knife-data-bag.1 +0 -617
  207. data/distro/common/man/man1/knife-delete.1 +0 -127
  208. data/distro/common/man/man1/knife-deps.1 +0 -246
  209. data/distro/common/man/man1/knife-diff.1 +0 -226
  210. data/distro/common/man/man1/knife-download.1 +0 -258
  211. data/distro/common/man/man1/knife-edit.1 +0 -121
  212. data/distro/common/man/man1/knife-environment.1 +0 -496
  213. data/distro/common/man/man1/knife-exec.1 +0 -362
  214. data/distro/common/man/man1/knife-index-rebuild.1 +0 -63
  215. data/distro/common/man/man1/knife-list.1 +0 -174
  216. data/distro/common/man/man1/knife-node.1 +0 -716
  217. data/distro/common/man/man1/knife-raw.1 +0 -172
  218. data/distro/common/man/man1/knife-recipe-list.1 +0 -85
  219. data/distro/common/man/man1/knife-role.1 +0 -426
  220. data/distro/common/man/man1/knife-search.1 +0 -359
  221. data/distro/common/man/man1/knife-serve.1 +0 -109
  222. data/distro/common/man/man1/knife-show.1 +0 -160
  223. data/distro/common/man/man1/knife-ssh.1 +0 -284
  224. data/distro/common/man/man1/knife-ssl-check.1 +0 -207
  225. data/distro/common/man/man1/knife-ssl-fetch.1 +0 -207
  226. data/distro/common/man/man1/knife-status.1 +0 -234
  227. data/distro/common/man/man1/knife-tag.1 +0 -189
  228. data/distro/common/man/man1/knife-upload.1 +0 -280
  229. data/distro/common/man/man1/knife-user.1 +0 -356
  230. data/distro/common/man/man1/knife-xargs.1 +0 -189
  231. data/distro/common/man/man1/knife.1 +0 -332
  232. data/distro/common/man/man8/chef-apply.8 +0 -86
  233. data/distro/common/man/man8/chef-client.8 +0 -398
  234. data/distro/common/man/man8/chef-solo.8 +0 -260
  235. data/distro/common/markdown/README +0 -3
  236. data/distro/common/markdown/man1/chef-shell.mkd +0 -195
  237. data/distro/common/markdown/man1/knife-bootstrap.mkd +0 -141
  238. data/distro/common/markdown/man1/knife-client.mkd +0 -103
  239. data/distro/common/markdown/man1/knife-configure.mkd +0 -71
  240. data/distro/common/markdown/man1/knife-cookbook-site.mkd +0 -123
  241. data/distro/common/markdown/man1/knife-cookbook.mkd +0 -263
  242. data/distro/common/markdown/man1/knife-data-bag.mkd +0 -121
  243. data/distro/common/markdown/man1/knife-environment.mkd +0 -151
  244. data/distro/common/markdown/man1/knife-exec.mkd +0 -42
  245. data/distro/common/markdown/man1/knife-index.mkd +0 -30
  246. data/distro/common/markdown/man1/knife-node.mkd +0 -130
  247. data/distro/common/markdown/man1/knife-role.mkd +0 -85
  248. data/distro/common/markdown/man1/knife-search.mkd +0 -180
  249. data/distro/common/markdown/man1/knife-ssh.mkd +0 -69
  250. data/distro/common/markdown/man1/knife-status.mkd +0 -36
  251. data/distro/common/markdown/man1/knife-tag.mkd +0 -39
  252. data/distro/common/markdown/man1/knife.mkd +0 -213
  253. data/distro/common/markdown/man8/chef-client.mkd +0 -75
  254. data/distro/common/markdown/man8/chef-expander.mkd +0 -81
  255. data/distro/common/markdown/man8/chef-expanderctl.mkd +0 -57
  256. data/distro/common/markdown/man8/chef-server-webui.mkd +0 -121
  257. data/distro/common/markdown/man8/chef-server.mkd +0 -120
  258. data/distro/common/markdown/man8/chef-solo.mkd +0 -107
  259. data/distro/common/markdown/man8/chef-solr.mkd +0 -89
  260. data/tasks/cbgb.rb +0 -84
@@ -1,362 +0,0 @@
1
- .\" Man page generated from reStructuredText.
2
- .
3
- .TH "KNIFE-EXEC" "1" "Chef 12.0" "" "knife exec"
4
- .SH NAME
5
- knife-exec \- The man page for the knife exec subcommand.
6
- .
7
- .nr rst2man-indent-level 0
8
- .
9
- .de1 rstReportMargin
10
- \\$1 \\n[an-margin]
11
- level \\n[rst2man-indent-level]
12
- level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
13
- -
14
- \\n[rst2man-indent0]
15
- \\n[rst2man-indent1]
16
- \\n[rst2man-indent2]
17
- ..
18
- .de1 INDENT
19
- .\" .rstReportMargin pre:
20
- . RS \\$1
21
- . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22
- . nr rst2man-indent-level +1
23
- .\" .rstReportMargin post:
24
- ..
25
- .de UNINDENT
26
- . RE
27
- .\" indent \\n[an-margin]
28
- .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
- .nr rst2man-indent-level -1
30
- .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31
- .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
32
- ..
33
- .sp
34
- The \fBknife exec\fP subcommand uses the knife configuration file to execute Ruby scripts in the context of a fully configured chef\-client\&. This subcommand is most often used to run scripts that will only access Chef server one time (or otherwise very infrequently). Use this subcommand any time that an operation does not warrant full usage of the knife subcommand library.
35
- .sp
36
- \fBAuthenticated API Requests\fP
37
- .sp
38
- The \fBknife exec\fP subcommand can be used to make authenticated API requests to the Chef server using the following methods:
39
- .TS
40
- center;
41
- |l|l|.
42
- _
43
- T{
44
- Method
45
- T} T{
46
- Description
47
- T}
48
- _
49
- T{
50
- \fBapi.delete\fP
51
- T} T{
52
- Use to delete an object from the Chef server\&.
53
- T}
54
- _
55
- T{
56
- \fBapi.get\fP
57
- T} T{
58
- Use to get the details of an object on the Chef server\&.
59
- T}
60
- _
61
- T{
62
- \fBapi.post\fP
63
- T} T{
64
- Use to add an object to the Chef server\&.
65
- T}
66
- _
67
- T{
68
- \fBapi.put\fP
69
- T} T{
70
- Use to update an object on the Chef server\&.
71
- T}
72
- _
73
- .TE
74
- .sp
75
- These methods are used with the \fB\-E\fP option, which executes that string locally on the workstation using chef\-shell\&. These methods have the following syntax:
76
- .INDENT 0.0
77
- .INDENT 3.5
78
- .sp
79
- .nf
80
- .ft C
81
- $ knife exec \-E \(aqapi.method(/endpoint)\(aq
82
- .ft P
83
- .fi
84
- .UNINDENT
85
- .UNINDENT
86
- .sp
87
- where:
88
- .INDENT 0.0
89
- .IP \(bu 2
90
- \fBapi.method\fP is the corresponding authentication method \-\-\- \fBapi.delete\fP, \fBapi.get\fP, \fBapi.post\fP, or \fBapi.put\fP
91
- .IP \(bu 2
92
- \fB/endpoint\fP is an endpoint in the Chef server API
93
- .UNINDENT
94
- .sp
95
- For example, to get the data for a node named "Example_Node":
96
- .INDENT 0.0
97
- .INDENT 3.5
98
- .sp
99
- .nf
100
- .ft C
101
- $ knife exec \-E \(aqputs api.get("/nodes/Example_Node")\(aq
102
- .ft P
103
- .fi
104
- .UNINDENT
105
- .UNINDENT
106
- .sp
107
- and to ensure that the output is visible in the console, add the \fBputs\fP in front of the API authorization request:
108
- .INDENT 0.0
109
- .INDENT 3.5
110
- .sp
111
- .nf
112
- .ft C
113
- $ knife exec \-E \(aqputs api.get("/nodes/Example_Node")\(aq
114
- .ft P
115
- .fi
116
- .UNINDENT
117
- .UNINDENT
118
- .sp
119
- where \fBputs\fP is the shorter version of the \fB$stdout.puts\fP predefined variable in Ruby\&.
120
- .sp
121
- The following example shows how to add a client named "IBM305RAMAC" and the \fB/clients\fP endpoint, and then return the private key for that user in the console:
122
- .INDENT 0.0
123
- .INDENT 3.5
124
- .sp
125
- .nf
126
- .ft C
127
- $ client_desc = {
128
- "name" => "IBM305RAMAC",
129
- "admin" => false
130
- }
131
-
132
- new_client = api.post("/clients", client_desc)
133
- puts new_client["private_key"]
134
- .ft P
135
- .fi
136
- .UNINDENT
137
- .UNINDENT
138
- .sp
139
- \fBSyntax\fP
140
- .sp
141
- This subcommand has the following syntax:
142
- .INDENT 0.0
143
- .INDENT 3.5
144
- .sp
145
- .nf
146
- .ft C
147
- $ knife exec SCRIPT (options)
148
- .ft P
149
- .fi
150
- .UNINDENT
151
- .UNINDENT
152
- .sp
153
- \fBOptions\fP
154
- .sp
155
- This subcommand has the following options:
156
- .INDENT 0.0
157
- .TP
158
- .B \fB\-c CONFIG_FILE\fP, \fB\-\-config CONFIG_FILE\fP
159
- The configuration file to use.
160
- .TP
161
- .B \fB\-\-chef\-zero\-port PORT\fP
162
- The port on which chef\-zero will listen.
163
- .TP
164
- .B \fB\-\-[no\-]color\fP
165
- Use to view colored output.
166
- .TP
167
- .B \fB\-d\fP, \fB\-\-disable\-editing\fP
168
- Use to prevent the $EDITOR from being opened and to accept data as\-is.
169
- .TP
170
- .B \fB\-\-defaults\fP
171
- Use to have knife use the default value instead of asking a user to provide one.
172
- .TP
173
- .B \fB\-E CODE\fP, \fB\-\-exec CODE\fP
174
- A string of code that will be executed.
175
- .TP
176
- .B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP
177
- The $EDITOR that is used for all interactive commands.
178
- .TP
179
- .B \fB\-\-environment ENVIRONMENT\fP
180
- The name of the environment. When this option is added to a command, the command will run only against the named environment.
181
- .TP
182
- .B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
183
- The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP\&.
184
- .TP
185
- .B \fB\-h\fP, \fB\-\-help\fP
186
- Shows help for the command.
187
- .TP
188
- .B \fB\-k KEY\fP, \fB\-\-key KEY\fP
189
- The private key that knife will use to sign requests made by the API client to the Chef server\&.
190
- .TP
191
- .B \fB\-p PATH:PATH\fP, \fB\-\-script\-path PATH:PATH\fP
192
- A colon\-separated path at which Ruby scripts are located.
193
- .TP
194
- .B \fB\-\-print\-after\fP
195
- Use to show data after a destructive operation.
196
- .TP
197
- .B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
198
- The URL for the Chef server\&.
199
- .TP
200
- .B \fB\-u USER\fP, \fB\-\-user USER\fP
201
- The user name used by knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key.
202
- .TP
203
- .B \fB\-v\fP, \fB\-\-version\fP
204
- The version of the chef\-client\&.
205
- .TP
206
- .B \fB\-V\fP, \fB\-\-verbose\fP
207
- Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
208
- .TP
209
- .B \fB\-y\fP, \fB\-\-yes\fP
210
- Use to respond to all confirmation prompts with "Yes". knife will not ask for confirmation.
211
- .TP
212
- .B \fB\-z\fP, \fB\-\-local\-mode\fP
213
- Use to run the chef\-client in local mode. This allows all commands that work against the Chef server to also work against the local chef\-repo\&.
214
- .UNINDENT
215
- .sp
216
- \fBExamples\fP
217
- .sp
218
- There are three ways to use \fBknife exec\fP to run Ruby script files. For example:
219
- .INDENT 0.0
220
- .INDENT 3.5
221
- .sp
222
- .nf
223
- .ft C
224
- $ knife exec /path/to/script_file
225
- .ft P
226
- .fi
227
- .UNINDENT
228
- .UNINDENT
229
- .sp
230
- or:
231
- .INDENT 0.0
232
- .INDENT 3.5
233
- .sp
234
- .nf
235
- .ft C
236
- $ knife exec \-E \(aqRUBY CODE\(aq
237
- .ft P
238
- .fi
239
- .UNINDENT
240
- .UNINDENT
241
- .sp
242
- or:
243
- .INDENT 0.0
244
- .INDENT 3.5
245
- .sp
246
- .nf
247
- .ft C
248
- $ knife exec
249
- RUBY CODE
250
- ^D
251
- .ft P
252
- .fi
253
- .UNINDENT
254
- .UNINDENT
255
- .sp
256
- To check the status of knife using a Ruby script named \fBstatus.rb\fP (which looks like):
257
- .INDENT 0.0
258
- .INDENT 3.5
259
- .sp
260
- .nf
261
- .ft C
262
- printf "%\-5s %\-12s %\-8s %s\en", "Check In", "Name", "Ruby", "Recipes"
263
- nodes.all do |n|
264
- checkin = Time.at(n[\(aqohai_time\(aq]).strftime("%F %R")
265
- rubyver = n[\(aqlanguages\(aq][\(aqruby\(aq][\(aqversion\(aq]
266
- recipes = n.run_list.expand(_default).recipes.join(", ")
267
- printf "%\-20s %\-12s %\-8s %s\en", checkin, n.name, rubyver, recipes
268
- end
269
- .ft P
270
- .fi
271
- .UNINDENT
272
- .UNINDENT
273
- .sp
274
- and is located in a directory named \fBscripts/\fP, enter:
275
- .INDENT 0.0
276
- .INDENT 3.5
277
- .sp
278
- .nf
279
- .ft C
280
- $ knife exec scripts/status.rb
281
- .ft P
282
- .fi
283
- .UNINDENT
284
- .UNINDENT
285
- .sp
286
- To show the available free memory for all nodes, enter:
287
- .INDENT 0.0
288
- .INDENT 3.5
289
- .sp
290
- .nf
291
- .ft C
292
- $ knife exec \-E \(aqnodes.all {|n| puts "#{n.name} has #{n.memory.total} free memory"}\(aq
293
- .ft P
294
- .fi
295
- .UNINDENT
296
- .UNINDENT
297
- .sp
298
- To list all of the available search indexes, enter:
299
- .INDENT 0.0
300
- .INDENT 3.5
301
- .sp
302
- .nf
303
- .ft C
304
- $ knife exec \-E \(aqputs api.get("search").keys\(aq
305
- .ft P
306
- .fi
307
- .UNINDENT
308
- .UNINDENT
309
- .sp
310
- To query a node for multiple attributes using a Ruby script named \fBsearch_attributes.rb\fP (which looks like):
311
- .INDENT 0.0
312
- .INDENT 3.5
313
- .sp
314
- .nf
315
- .ft C
316
- % cat scripts/search_attributes.rb
317
- query = ARGV[2]
318
- attributes = ARGV[3].split(",")
319
- puts "Your query: #{query}"
320
- puts "Your attributes: #{attributes.join(" ")}"
321
- results = {}
322
- search(:node, query) do |n|
323
- results[n.name] = {}
324
- attributes.each {|a| results[n.name][a] = n[a]}
325
- end
326
-
327
- puts results
328
- exit 0
329
- .ft P
330
- .fi
331
- .UNINDENT
332
- .UNINDENT
333
- .sp
334
- enter:
335
- .INDENT 0.0
336
- .INDENT 3.5
337
- .sp
338
- .nf
339
- .ft C
340
- % knife exec scripts/search_attributes.rb "hostname:test_system" ipaddress,fqdn
341
- .ft P
342
- .fi
343
- .UNINDENT
344
- .UNINDENT
345
- .sp
346
- to return something like:
347
- .INDENT 0.0
348
- .INDENT 3.5
349
- .sp
350
- .nf
351
- .ft C
352
- Your query: hostname:test_system
353
- Your attributes: ipaddress fqdn
354
- {"test_system.example.com"=>{"ipaddress"=>"10.1.1.200", "fqdn"=>"test_system.example.com"}}
355
- .ft P
356
- .fi
357
- .UNINDENT
358
- .UNINDENT
359
- .SH AUTHOR
360
- Chef
361
- .\" Generated by docutils manpage writer.
362
- .
@@ -1,63 +0,0 @@
1
- .\" Man page generated from reStructuredText.
2
- .
3
- .TH "KNIFE-INDEX-REBUILD" "1" "Chef 12.0" "" "knife index rebuild"
4
- .SH NAME
5
- knife-index-rebuild \- The man page for the knife index rebuild subcommand.
6
- .
7
- .nr rst2man-indent-level 0
8
- .
9
- .de1 rstReportMargin
10
- \\$1 \\n[an-margin]
11
- level \\n[rst2man-indent-level]
12
- level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
13
- -
14
- \\n[rst2man-indent0]
15
- \\n[rst2man-indent1]
16
- \\n[rst2man-indent2]
17
- ..
18
- .de1 INDENT
19
- .\" .rstReportMargin pre:
20
- . RS \\$1
21
- . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22
- . nr rst2man-indent-level +1
23
- .\" .rstReportMargin post:
24
- ..
25
- .de UNINDENT
26
- . RE
27
- .\" indent \\n[an-margin]
28
- .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
- .nr rst2man-indent-level -1
30
- .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31
- .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
32
- ..
33
- .sp
34
- The \fBknife index rebuild\fP subcommand is used to rebuild the search indexes for the open source Chef server\&. This operation is destructive and may take some time.
35
- .sp
36
- \fBNOTE:\fP
37
- .INDENT 0.0
38
- .INDENT 3.5
39
- This subcommand ONLY works when run against the open source Chef server version 10.x. This subcommand will NOT run against open source Chef server 11, Enterprise Chef (including hosted Enterprise Chef), or Private Chef\&.
40
- .UNINDENT
41
- .UNINDENT
42
- .sp
43
- \fBSyntax\fP
44
- .sp
45
- This subcommand has the following syntax:
46
- .INDENT 0.0
47
- .INDENT 3.5
48
- .sp
49
- .nf
50
- .ft C
51
- $ knife index rebuild
52
- .ft P
53
- .fi
54
- .UNINDENT
55
- .UNINDENT
56
- .sp
57
- \fBOptions\fP
58
- .sp
59
- This command does not have any specific options.
60
- .SH AUTHOR
61
- Chef
62
- .\" Generated by docutils manpage writer.
63
- .
@@ -1,174 +0,0 @@
1
- .\" Man page generated from reStructuredText.
2
- .
3
- .TH "KNIFE-LIST" "1" "Chef 12.0" "" "knife list"
4
- .SH NAME
5
- knife-list \- The man page for the knife list subcommand.
6
- .
7
- .nr rst2man-indent-level 0
8
- .
9
- .de1 rstReportMargin
10
- \\$1 \\n[an-margin]
11
- level \\n[rst2man-indent-level]
12
- level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
13
- -
14
- \\n[rst2man-indent0]
15
- \\n[rst2man-indent1]
16
- \\n[rst2man-indent2]
17
- ..
18
- .de1 INDENT
19
- .\" .rstReportMargin pre:
20
- . RS \\$1
21
- . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
22
- . nr rst2man-indent-level +1
23
- .\" .rstReportMargin post:
24
- ..
25
- .de UNINDENT
26
- . RE
27
- .\" indent \\n[an-margin]
28
- .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
- .nr rst2man-indent-level -1
30
- .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
31
- .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
32
- ..
33
- .sp
34
- The \fBknife list\fP subcommand is used to view a list of objects on the Chef server\&. This subcommand works similar to \fBknife cookbook list\fP, \fBknife data bag list\fP, \fBknife environment list\fP, \fBknife node list\fP, and \fBknife role list\fP, but with a single verb (and a single action).
35
- .sp
36
- \fBSyntax\fP
37
- .sp
38
- This subcommand has the following syntax:
39
- .INDENT 0.0
40
- .INDENT 3.5
41
- .sp
42
- .nf
43
- .ft C
44
- $ knife list [PATTERN...] (options)
45
- .ft P
46
- .fi
47
- .UNINDENT
48
- .UNINDENT
49
- .sp
50
- \fBOptions\fP
51
- .sp
52
- This subcommand has the following options:
53
- .INDENT 0.0
54
- .TP
55
- .B \fB\-1\fP
56
- Use to show only one column of results. Default: \fBfalse\fP\&.
57
- .TP
58
- .B \fB\-c CONFIG_FILE\fP, \fB\-\-config CONFIG_FILE\fP
59
- The configuration file to use.
60
- .TP
61
- .B \fB\-\-chef\-repo\-path PATH\fP
62
- The path to the chef\-repo\&. This setting will override the default path to the chef\-repo\&. Default: same as specified by \fBchef_repo_path\fP in config.rb.
63
- .TP
64
- .B \fB\-\-chef\-zero\-port PORT\fP
65
- The port on which chef\-zero will listen.
66
- .TP
67
- .B \fB\-\-[no\-]color\fP
68
- Use to view colored output.
69
- .TP
70
- .B \fB\-\-concurrency\fP
71
- The number of allowed concurrent connections. Default: \fB10\fP\&.
72
- .TP
73
- .B \fB\-d\fP
74
- Use to prevent a directory\(aqs children from showing when a directory matches a pattern. Default value: \fBfalse\fP\&.
75
- .TP
76
- .B \fB\-\-defaults\fP
77
- Use to have knife use the default value instead of asking a user to provide one.
78
- .TP
79
- .B \fB\-\-disable\-editing\fP
80
- Use to prevent the $EDITOR from being opened and to accept data as\-is.
81
- .TP
82
- .B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP
83
- The $EDITOR that is used for all interactive commands.
84
- .TP
85
- .B \fB\-E ENVIRONMENT\fP, \fB\-\-environment ENVIRONMENT\fP
86
- The name of the environment. When this option is added to a command, the command will run only against the named environment.
87
- .TP
88
- .B \fB\-f\fP, \fB\-\-flat\fP
89
- Use to show a list of file names. Set to \fBfalse\fP to view ls\-like output. Default: \fBfalse\fP\&.
90
- .TP
91
- .B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
92
- The output format: \fBsummary\fP (default), \fBtext\fP, \fBjson\fP, \fByaml\fP, and \fBpp\fP\&.
93
- .TP
94
- .B \fB\-h\fP, \fB\-\-help\fP
95
- Shows help for the command.
96
- .TP
97
- .B \fB\-k KEY\fP, \fB\-\-key KEY\fP
98
- The private key that knife will use to sign requests made by the API client to the Chef server\&.
99
- .TP
100
- .B \fB\-\-local\fP
101
- Use to return only the contents of the local directory. Default: \fBfalse\fP\&.
102
- .TP
103
- .B \fB\-p\fP
104
- Use to show directories with trailing slashes (/). Default: \fBfalse\fP\&.
105
- .TP
106
- .B \fB\-\-print\-after\fP
107
- Use to show data after a destructive operation.
108
- .TP
109
- .B \fB\-R\fP
110
- Use to list directories recursively. Default: \fBfalse\fP\&.
111
- .TP
112
- .B \fB\-\-repo\-mode MODE\fP
113
- The layout of the local chef\-repo\&. Possible values: \fBstatic\fP, \fBeverything\fP, or \fBhosted_everything\fP\&. Use \fBstatic\fP for just roles, environments, cookbooks, and data bags. By default, \fBeverything\fP and \fBhosted_everything\fP are dynamically selected depending on the server type. Default: \fBeverything\fP / \fBhosted_everything\fP\&.
114
- .TP
115
- .B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
116
- The URL for the Chef server\&.
117
- .TP
118
- .B \fB\-u USER\fP, \fB\-\-user USER\fP
119
- The user name used by knife to sign requests made by the API client to the Chef server\&. Authentication will fail if the user name does not match the private key.
120
- .TP
121
- .B \fB\-v\fP, \fB\-\-version\fP
122
- The version of the chef\-client\&.
123
- .TP
124
- .B \fB\-V\fP, \fB\-\-verbose\fP
125
- Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
126
- .TP
127
- .B \fB\-y\fP, \fB\-\-yes\fP
128
- Use to respond to all confirmation prompts with "Yes". knife will not ask for confirmation.
129
- .TP
130
- .B \fB\-z\fP, \fB\-\-local\-mode\fP
131
- Use to run the chef\-client in local mode. This allows all commands that work against the Chef server to also work against the local chef\-repo\&.
132
- .UNINDENT
133
- .sp
134
- \fBExamples\fP
135
- .sp
136
- For example, to view a list of roles on the Chef server:
137
- .INDENT 0.0
138
- .INDENT 3.5
139
- .sp
140
- .nf
141
- .ft C
142
- $ knife list roles/
143
- .ft P
144
- .fi
145
- .UNINDENT
146
- .UNINDENT
147
- .sp
148
- To view a list of roles and environments on the Chef server:
149
- .INDENT 0.0
150
- .INDENT 3.5
151
- .sp
152
- .nf
153
- .ft C
154
- $ knife list roles/ environments/
155
- .ft P
156
- .fi
157
- .UNINDENT
158
- .UNINDENT
159
- .sp
160
- To view a list of absolutely everything on the Chef server:
161
- .INDENT 0.0
162
- .INDENT 3.5
163
- .sp
164
- .nf
165
- .ft C
166
- $ knife list \-R /
167
- .ft P
168
- .fi
169
- .UNINDENT
170
- .UNINDENT
171
- .SH AUTHOR
172
- Chef
173
- .\" Generated by docutils manpage writer.
174
- .