chef 11.6.2-x86-mingw32 → 11.8.0.rc.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (628) hide show
  1. data/CONTRIBUTING.md +12 -12
  2. data/Rakefile +11 -14
  3. data/bin/chef-apply +2 -2
  4. data/bin/chef-client +2 -2
  5. data/bin/chef-service-manager +2 -2
  6. data/bin/chef-shell +3 -0
  7. data/bin/chef-solo +2 -2
  8. data/bin/knife +3 -3
  9. data/distro/arch/etc/rc.d/chef-client +2 -2
  10. data/distro/arch/etc/rc.d/chef-server +2 -2
  11. data/distro/arch/etc/rc.d/chef-server-webui +2 -2
  12. data/distro/arch/etc/rc.d/chef-solr +2 -2
  13. data/distro/common/html/chef-client.8.html +3 -3
  14. data/distro/common/html/chef-expander.8.html +3 -3
  15. data/distro/common/html/chef-expanderctl.8.html +3 -3
  16. data/distro/common/html/chef-server-webui.8.html +3 -3
  17. data/distro/common/html/chef-server.8.html +3 -3
  18. data/distro/common/html/chef-shell.1.html +3 -3
  19. data/distro/common/html/chef-solo.8.html +3 -3
  20. data/distro/common/html/chef-solr.8.html +4 -4
  21. data/distro/common/html/knife-bootstrap.1.html +3 -3
  22. data/distro/common/html/knife-client.1.html +3 -3
  23. data/distro/common/html/knife-configure.1.html +13 -13
  24. data/distro/common/html/knife-cookbook-site.1.html +3 -3
  25. data/distro/common/html/knife-cookbook.1.html +7 -7
  26. data/distro/common/html/knife-data-bag.1.html +3 -3
  27. data/distro/common/html/knife-environment.1.html +3 -3
  28. data/distro/common/html/knife-exec.1.html +3 -3
  29. data/distro/common/html/knife-index.1.html +3 -3
  30. data/distro/common/html/knife-node.1.html +3 -3
  31. data/distro/common/html/knife-role.1.html +3 -3
  32. data/distro/common/html/knife-search.1.html +3 -3
  33. data/distro/common/html/knife-ssh.1.html +3 -3
  34. data/distro/common/html/knife-status.1.html +3 -3
  35. data/distro/common/html/knife-tag.1.html +3 -3
  36. data/distro/common/html/knife.1.html +3 -3
  37. data/distro/common/man/man1/README.md +58 -0
  38. data/distro/common/man/man1/chef-shell.1 +114 -219
  39. data/distro/common/man/man1/knife-bootstrap.1 +176 -180
  40. data/distro/common/man/man1/knife-client.1 +368 -0
  41. data/distro/common/man/man1/knife-configure.1 +147 -85
  42. data/distro/common/man/man1/knife-cookbook-site.1 +465 -133
  43. data/distro/common/man/man1/knife-cookbook.1 +614 -304
  44. data/distro/common/man/man1/knife-data-bag.1 +476 -113
  45. data/distro/common/man/man1/knife-delete.1 +132 -0
  46. data/distro/common/man/man1/knife-deps.1 +219 -0
  47. data/distro/common/man/man1/knife-diff.1 +212 -0
  48. data/distro/common/man/man1/knife-download.1 +220 -0
  49. data/distro/common/man/man1/knife-edit.1 +126 -0
  50. data/distro/common/man/man1/knife-environment.1 +324 -0
  51. data/distro/common/man/man1/knife-exec.1 +317 -35
  52. data/distro/common/man/man1/knife-index-rebuild.1 +115 -0
  53. data/distro/common/man/man1/knife-list.1 +167 -0
  54. data/distro/common/man/man1/knife-node.1 +567 -123
  55. data/distro/common/man/man1/knife-raw.1 +170 -0
  56. data/distro/common/man/man1/knife-recipe-list.1 +133 -0
  57. data/distro/common/man/man1/knife-role.1 +367 -81
  58. data/distro/common/man/man1/knife-search.1 +267 -243
  59. data/distro/common/man/man1/knife-show.1 +138 -0
  60. data/distro/common/man/man1/knife-ssh.1 +241 -66
  61. data/distro/common/man/man1/knife-status.1 +202 -24
  62. data/distro/common/man/man1/knife-tag.1 +176 -39
  63. data/distro/common/man/man1/knife-upload.1 +239 -0
  64. data/distro/common/man/man1/knife-user.1 +317 -0
  65. data/distro/common/man/man1/knife-xargs.1 +166 -0
  66. data/distro/common/man/man1/knife.1 +227 -284
  67. data/distro/common/man/man8/chef-client.8 +247 -81
  68. data/distro/common/man/man8/chef-solo.8 +142 -110
  69. data/distro/common/markdown/man1/knife-bootstrap.mkd +1 -1
  70. data/distro/common/markdown/man1/knife-configure.mkd +11 -11
  71. data/distro/common/markdown/man1/knife-cookbook.mkd +4 -4
  72. data/distro/common/markdown/man8/chef-expander.mkd +1 -1
  73. data/distro/common/markdown/man8/chef-expanderctl.mkd +1 -1
  74. data/distro/debian/etc/init.d/chef-client +1 -1
  75. data/distro/debian/etc/init.d/chef-expander +1 -1
  76. data/distro/debian/etc/init.d/chef-server +1 -1
  77. data/distro/debian/etc/init.d/chef-server-webui +1 -1
  78. data/distro/debian/etc/init.d/chef-solr +1 -1
  79. data/distro/debian/etc/init/chef-client.conf +1 -1
  80. data/distro/debian/etc/init/chef-expander.conf +1 -1
  81. data/distro/debian/etc/init/chef-server-webui.conf +1 -1
  82. data/distro/debian/etc/init/chef-server.conf +1 -1
  83. data/distro/debian/etc/init/chef-solr.conf +1 -1
  84. data/distro/redhat/etc/init.d/chef-client +1 -1
  85. data/distro/redhat/etc/init.d/chef-server +2 -2
  86. data/distro/redhat/etc/init.d/chef-server-webui +2 -2
  87. data/distro/redhat/etc/init.d/chef-solr +2 -2
  88. data/lib/chef/api_client.rb +20 -5
  89. data/lib/chef/application.rb +53 -22
  90. data/lib/chef/application/agent.rb +2 -2
  91. data/lib/chef/application/client.rb +34 -24
  92. data/lib/chef/application/knife.rb +10 -0
  93. data/lib/chef/application/solo.rb +9 -27
  94. data/lib/chef/application/windows_service.rb +24 -10
  95. data/lib/chef/application/windows_service_manager.rb +8 -0
  96. data/lib/chef/checksum/storage.rb +2 -2
  97. data/lib/chef/checksum/storage/filesystem.rb +2 -2
  98. data/lib/chef/chef_fs/chef_fs_data_store.rb +1 -1
  99. data/lib/chef/chef_fs/command_line.rb +2 -1
  100. data/lib/chef/chef_fs/config.rb +19 -64
  101. data/lib/chef/chef_fs/data_handler/client_data_handler.rb +1 -2
  102. data/lib/chef/chef_fs/file_system.rb +2 -2
  103. data/lib/chef/chef_fs/file_system/acl_entry.rb +1 -1
  104. data/lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb +37 -0
  105. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +16 -8
  106. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb +19 -4
  107. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +27 -12
  108. data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +31 -3
  109. data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +12 -5
  110. data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +12 -2
  111. data/lib/chef/chef_fs/file_system/cookbook_dir.rb +3 -2
  112. data/lib/chef/chef_fs/file_system/cookbook_file.rb +2 -5
  113. data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +21 -6
  114. data/lib/chef/chef_fs/file_system/data_bag_dir.rb +1 -1
  115. data/lib/chef/chef_fs/file_system/data_bags_dir.rb +3 -2
  116. data/lib/chef/chef_fs/file_system/file_system_entry.rb +15 -5
  117. data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +2 -1
  118. data/lib/chef/chef_fs/file_system/nodes_dir.rb +1 -1
  119. data/lib/chef/chef_fs/file_system/operation_failed_error.rb +8 -0
  120. data/lib/chef/chef_fs/file_system/rest_list_dir.rb +4 -2
  121. data/lib/chef/chef_fs/file_system/rest_list_entry.rb +4 -6
  122. data/lib/chef/chef_fs/knife.rb +39 -22
  123. data/lib/chef/chef_fs/path_utils.rb +5 -0
  124. data/lib/chef/client.rb +9 -3
  125. data/lib/chef/config.rb +306 -115
  126. data/lib/chef/config_fetcher.rb +79 -0
  127. data/lib/chef/cookbook/file_vendor.rb +5 -5
  128. data/lib/chef/cookbook/metadata.rb +2 -2
  129. data/lib/chef/cookbook/syntax_check.rb +6 -16
  130. data/lib/chef/cookbook_site_streaming_uploader.rb +8 -4
  131. data/lib/chef/cookbook_uploader.rb +10 -8
  132. data/lib/chef/cookbook_version.rb +24 -8
  133. data/lib/chef/daemon.rb +14 -75
  134. data/lib/chef/data_bag.rb +2 -3
  135. data/lib/chef/dsl/include_recipe.rb +2 -2
  136. data/lib/chef/event_dispatch/base.rb +1 -1
  137. data/lib/chef/event_dispatch/dispatcher.rb +1 -1
  138. data/lib/chef/file_access_control/windows.rb +1 -1
  139. data/lib/chef/formatters/doc.rb +5 -5
  140. data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +2 -2
  141. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +2 -2
  142. data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +2 -2
  143. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +2 -2
  144. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +2 -2
  145. data/lib/chef/handler/json_file.rb +2 -2
  146. data/lib/chef/http.rb +386 -0
  147. data/lib/chef/{rest → http}/auth_credentials.rb +1 -1
  148. data/lib/chef/http/authenticator.rb +89 -0
  149. data/lib/chef/http/basic_client.rb +114 -0
  150. data/lib/chef/{rest → http}/cookie_jar.rb +1 -1
  151. data/lib/chef/http/cookie_manager.rb +56 -0
  152. data/lib/chef/http/decompressor.rb +137 -0
  153. data/lib/chef/{rest/rest_request.rb → http/http_request.rb} +13 -74
  154. data/lib/chef/http/json_input.rb +53 -0
  155. data/lib/chef/http/json_output.rb +69 -0
  156. data/lib/chef/http/json_to_model_output.rb +34 -0
  157. data/lib/chef/http/simple.rb +16 -0
  158. data/lib/chef/http/ssl_policies.rb +129 -0
  159. data/lib/chef/knife.rb +45 -23
  160. data/lib/chef/knife/bootstrap.rb +10 -3
  161. data/lib/chef/knife/bootstrap/chef-full.erb +10 -1
  162. data/lib/chef/knife/client_create.rb +1 -1
  163. data/lib/chef/knife/configure.rb +1 -1
  164. data/lib/chef/knife/cookbook_create.rb +7 -7
  165. data/lib/chef/knife/cookbook_download.rb +2 -2
  166. data/lib/chef/knife/cookbook_metadata_from_file.rb +2 -2
  167. data/lib/chef/knife/cookbook_show.rb +3 -3
  168. data/lib/chef/knife/cookbook_site_install.rb +2 -2
  169. data/lib/chef/knife/cookbook_site_list.rb +2 -2
  170. data/lib/chef/knife/cookbook_site_search.rb +3 -3
  171. data/lib/chef/knife/cookbook_site_show.rb +5 -5
  172. data/lib/chef/knife/core/bootstrap_context.rb +7 -3
  173. data/lib/chef/knife/core/node_editor.rb +16 -36
  174. data/lib/chef/knife/core/node_presenter.rb +1 -1
  175. data/lib/chef/knife/core/subcommand_loader.rb +5 -5
  176. data/lib/chef/knife/core/ui.rb +9 -13
  177. data/lib/chef/knife/data_bag_create.rb +7 -5
  178. data/lib/chef/knife/data_bag_delete.rb +3 -3
  179. data/lib/chef/knife/data_bag_edit.rb +9 -7
  180. data/lib/chef/knife/data_bag_from_file.rb +10 -8
  181. data/lib/chef/knife/data_bag_list.rb +2 -2
  182. data/lib/chef/knife/data_bag_show.rb +9 -7
  183. data/lib/chef/knife/delete.rb +2 -0
  184. data/lib/chef/knife/deps.rb +2 -0
  185. data/lib/chef/knife/diff.rb +6 -0
  186. data/lib/chef/knife/download.rb +6 -0
  187. data/lib/chef/knife/edit.rb +5 -8
  188. data/lib/chef/knife/environment_from_file.rb +2 -2
  189. data/lib/chef/knife/help_topics.rb +1 -1
  190. data/lib/chef/knife/index_rebuild.rb +2 -2
  191. data/lib/chef/knife/list.rb +2 -0
  192. data/lib/chef/knife/raw.rb +31 -5
  193. data/lib/chef/knife/show.rb +2 -0
  194. data/lib/chef/knife/ssh.rb +21 -7
  195. data/lib/chef/knife/status.rb +1 -1
  196. data/lib/chef/knife/upload.rb +2 -0
  197. data/lib/chef/knife/xargs.rb +2 -0
  198. data/lib/chef/mixin/checksum.rb +2 -2
  199. data/lib/chef/mixin/command.rb +46 -17
  200. data/lib/chef/mixin/convert_to_class_name.rb +8 -8
  201. data/lib/chef/mixin/create_path.rb +9 -9
  202. data/lib/chef/mixin/deep_merge.rb +2 -2
  203. data/lib/chef/mixin/from_file.rb +6 -6
  204. data/lib/chef/mixin/language_include_recipe.rb +2 -2
  205. data/lib/chef/mixin/params_validate.rb +21 -21
  206. data/lib/chef/mixin/shell_out.rb +9 -0
  207. data/lib/chef/mixin/template.rb +13 -16
  208. data/lib/chef/mixin/why_run.rb +16 -16
  209. data/lib/chef/mixin/windows_architecture_helper.rb +5 -5
  210. data/lib/chef/mixin/xml_escape.rb +10 -10
  211. data/lib/chef/monkey_patches/numeric.rb +1 -1
  212. data/lib/chef/monkey_patches/regexp.rb +4 -4
  213. data/lib/chef/monkey_patches/string.rb +3 -3
  214. data/lib/chef/monkey_patches/tempfile.rb +2 -2
  215. data/lib/chef/node.rb +8 -0
  216. data/lib/chef/node/attribute.rb +1 -1
  217. data/lib/chef/platform/provider_mapping.rb +26 -1
  218. data/lib/chef/provider/batch.rb +3 -3
  219. data/lib/chef/provider/cron.rb +27 -13
  220. data/lib/chef/provider/cron/aix.rb +48 -0
  221. data/lib/chef/provider/cron/solaris.rb +6 -40
  222. data/lib/chef/provider/cron/unix.rb +76 -0
  223. data/lib/chef/provider/deploy/timestamped.rb +4 -4
  224. data/lib/chef/provider/erl_call.rb +1 -1
  225. data/lib/chef/provider/execute.rb +2 -2
  226. data/lib/chef/provider/git.rb +1 -0
  227. data/lib/chef/provider/group.rb +21 -21
  228. data/lib/chef/provider/group/dscl.rb +9 -9
  229. data/lib/chef/provider/group/gpasswd.rb +5 -5
  230. data/lib/chef/provider/group/groupadd.rb +11 -10
  231. data/lib/chef/provider/group/pw.rb +11 -11
  232. data/lib/chef/provider/group/suse.rb +4 -4
  233. data/lib/chef/provider/group/usermod.rb +8 -8
  234. data/lib/chef/provider/group/windows.rb +9 -9
  235. data/lib/chef/provider/http_request.rb +8 -8
  236. data/lib/chef/provider/ifconfig.rb +57 -37
  237. data/lib/chef/provider/ifconfig/aix.rb +99 -0
  238. data/lib/chef/provider/log.rb +3 -3
  239. data/lib/chef/provider/mdadm.rb +5 -4
  240. data/lib/chef/provider/mount.rb +12 -12
  241. data/lib/chef/provider/mount/aix.rb +179 -0
  242. data/lib/chef/provider/mount/mount.rb +29 -15
  243. data/lib/chef/provider/package.rb +26 -16
  244. data/lib/chef/provider/package/aix.rb +146 -0
  245. data/lib/chef/provider/package/apt.rb +16 -31
  246. data/lib/chef/provider/package/dpkg.rb +9 -9
  247. data/lib/chef/provider/package/freebsd.rb +2 -2
  248. data/lib/chef/provider/package/ips.rb +3 -3
  249. data/lib/chef/provider/package/macports.rb +1 -1
  250. data/lib/chef/provider/package/pacman.rb +8 -8
  251. data/lib/chef/provider/package/rpm.rb +14 -14
  252. data/lib/chef/provider/package/rubygems.rb +1 -1
  253. data/lib/chef/provider/package/smartos.rb +3 -3
  254. data/lib/chef/provider/package/solaris.rb +16 -6
  255. data/lib/chef/provider/package/yum-dump.py +4 -4
  256. data/lib/chef/provider/package/yum.rb +3 -3
  257. data/lib/chef/provider/powershell_script.rb +7 -7
  258. data/lib/chef/provider/remote_file/ftp.rb +1 -0
  259. data/lib/chef/provider/remote_file/http.rb +6 -13
  260. data/lib/chef/provider/remote_file/local_file.rb +1 -0
  261. data/lib/chef/provider/resource_update.rb +9 -9
  262. data/lib/chef/provider/ruby_block.rb +3 -3
  263. data/lib/chef/provider/script.rb +1 -1
  264. data/lib/chef/provider/service.rb +2 -2
  265. data/lib/chef/provider/service/debian.rb +35 -15
  266. data/lib/chef/provider/service/freebsd.rb +9 -9
  267. data/lib/chef/provider/service/gentoo.rb +4 -4
  268. data/lib/chef/provider/service/init.rb +1 -1
  269. data/lib/chef/provider/service/insserv.rb +2 -2
  270. data/lib/chef/provider/service/invokercd.rb +1 -1
  271. data/lib/chef/provider/service/redhat.rb +2 -2
  272. data/lib/chef/provider/service/simple.rb +6 -6
  273. data/lib/chef/provider/service/solaris.rb +1 -1
  274. data/lib/chef/provider/service/systemd.rb +3 -3
  275. data/lib/chef/provider/service/upstart.rb +15 -15
  276. data/lib/chef/provider/subversion.rb +6 -5
  277. data/lib/chef/provider/user.rb +13 -9
  278. data/lib/chef/provider/user/dscl.rb +28 -28
  279. data/lib/chef/provider/user/pw.rb +11 -11
  280. data/lib/chef/provider/user/useradd.rb +1 -1
  281. data/lib/chef/provider/user/windows.rb +7 -7
  282. data/lib/chef/provider/windows_script.rb +7 -7
  283. data/lib/chef/providers.rb +4 -0
  284. data/lib/chef/recipe.rb +2 -19
  285. data/lib/chef/resource/apt_package.rb +3 -3
  286. data/lib/chef/resource/bash.rb +3 -3
  287. data/lib/chef/resource/batch.rb +4 -4
  288. data/lib/chef/resource/bff_package.rb +36 -0
  289. data/lib/chef/resource/breakpoint.rb +3 -3
  290. data/lib/chef/resource/cron.rb +5 -5
  291. data/lib/chef/resource/csh.rb +3 -3
  292. data/lib/chef/resource/deploy.rb +16 -3
  293. data/lib/chef/resource/deploy_revision.rb +6 -6
  294. data/lib/chef/resource/directory.rb +2 -2
  295. data/lib/chef/resource/dpkg_package.rb +4 -4
  296. data/lib/chef/resource/easy_install_package.rb +1 -1
  297. data/lib/chef/resource/erl_call.rb +1 -1
  298. data/lib/chef/resource/freebsd_package.rb +4 -4
  299. data/lib/chef/resource/group.rb +15 -6
  300. data/lib/chef/resource/http_request.rb +6 -6
  301. data/lib/chef/resource/ifconfig.rb +4 -4
  302. data/lib/chef/resource/ips_package.rb +2 -2
  303. data/lib/chef/resource/log.rb +12 -11
  304. data/lib/chef/resource/macports_package.rb +2 -2
  305. data/lib/chef/resource/mount.rb +11 -12
  306. data/lib/chef/resource/ohai.rb +3 -3
  307. data/lib/chef/resource/pacman_package.rb +4 -4
  308. data/lib/chef/resource/perl.rb +3 -3
  309. data/lib/chef/resource/portage_package.rb +4 -4
  310. data/lib/chef/resource/powershell_script.rb +3 -3
  311. data/lib/chef/resource/python.rb +3 -3
  312. data/lib/chef/resource/route.rb +4 -4
  313. data/lib/chef/resource/rpm_package.rb +2 -2
  314. data/lib/chef/resource/ruby.rb +3 -3
  315. data/lib/chef/resource/ruby_block.rb +3 -3
  316. data/lib/chef/resource/scm.rb +10 -2
  317. data/lib/chef/resource/script.rb +5 -5
  318. data/lib/chef/resource/service.rb +5 -5
  319. data/lib/chef/resource/smartos_package.rb +8 -6
  320. data/lib/chef/resource/solaris_package.rb +8 -7
  321. data/lib/chef/resource/subversion.rb +3 -3
  322. data/lib/chef/resource/timestamped_deploy.rb +4 -4
  323. data/lib/chef/resource/user.rb +13 -13
  324. data/lib/chef/resource/windows_script.rb +6 -6
  325. data/lib/chef/resource/yum_package.rb +2 -2
  326. data/lib/chef/resource_collection.rb +1 -1
  327. data/lib/chef/resource_collection/stepable_iterator.rb +22 -22
  328. data/lib/chef/resource_definition.rb +8 -8
  329. data/lib/chef/resource_definition_list.rb +2 -2
  330. data/lib/chef/resource_reporter.rb +8 -2
  331. data/lib/chef/resources.rb +2 -0
  332. data/lib/chef/rest.rb +70 -334
  333. data/lib/chef/role.rb +17 -13
  334. data/lib/chef/run_context.rb +14 -0
  335. data/lib/chef/run_context/cookbook_compiler.rb +3 -3
  336. data/lib/chef/run_lock.rb +73 -20
  337. data/lib/chef/server_api.rb +41 -0
  338. data/lib/chef/shell.rb +3 -19
  339. data/lib/chef/shell/shell_session.rb +1 -1
  340. data/lib/chef/streaming_cookbook_uploader.rb +30 -26
  341. data/lib/chef/tasks/chef_repo.rake +17 -17
  342. data/lib/chef/util/backup.rb +2 -1
  343. data/lib/chef/util/diff.rb +76 -33
  344. data/lib/chef/util/windows.rb +2 -2
  345. data/lib/chef/util/windows/net_group.rb +2 -2
  346. data/lib/chef/util/windows/net_use.rb +2 -2
  347. data/lib/chef/util/windows/net_user.rb +3 -3
  348. data/lib/chef/util/windows/volume.rb +3 -3
  349. data/lib/chef/version.rb +1 -1
  350. data/lib/chef/win32/api/file.rb +1 -1
  351. data/lib/chef/win32/api/synchronization.rb +89 -0
  352. data/lib/chef/win32/handle.rb +1 -1
  353. data/lib/chef/win32/mutex.rb +94 -0
  354. data/lib/chef/win32/security/ace.rb +1 -1
  355. data/lib/chef/win32/security/sid.rb +1 -1
  356. data/lib/chef/win32/version.rb +5 -3
  357. data/spec/data/bootstrap/no_proxy.erb +2 -0
  358. data/spec/data/cookbooks/openldap/metadata.rb +8 -0
  359. data/spec/data/cookbooks/preseed/files/default/preseed-template.seed +4 -0
  360. data/spec/data/trusted_certs/example.crt +22 -0
  361. data/spec/data/trusted_certs/intermediate.pem +27 -0
  362. data/spec/data/trusted_certs/opscode.pem +38 -0
  363. data/spec/data/trusted_certs/root.pem +22 -0
  364. data/spec/functional/assets/PkgA.1.0.0.0.bff +0 -0
  365. data/spec/functional/assets/PkgA.2.0.0.0.bff +0 -0
  366. data/spec/functional/assets/dummy-1-0.aix6.1.noarch.rpm +0 -0
  367. data/spec/functional/assets/dummy-2-0.aix6.1.noarch.rpm +0 -0
  368. data/spec/functional/assets/mytest-1.0-1.noarch.rpm +0 -0
  369. data/spec/functional/assets/mytest-2.0-1.noarch.rpm +0 -0
  370. data/spec/functional/knife/cookbook_delete_spec.rb +4 -7
  371. data/spec/functional/knife/exec_spec.rb +0 -3
  372. data/spec/functional/knife/ssh_spec.rb +2 -6
  373. data/spec/functional/resource/base.rb +41 -0
  374. data/spec/functional/resource/batch_spec.rb +6 -33
  375. data/spec/functional/resource/bff_spec.rb +122 -0
  376. data/spec/functional/resource/cron_spec.rb +147 -0
  377. data/spec/functional/resource/group_spec.rb +204 -0
  378. data/spec/functional/resource/ifconfig_spec.rb +163 -0
  379. data/spec/functional/resource/link_spec.rb +4 -4
  380. data/spec/functional/resource/mount_spec.rb +207 -0
  381. data/spec/functional/resource/package_spec.rb +95 -17
  382. data/spec/functional/resource/powershell_spec.rb +21 -22
  383. data/spec/functional/resource/registry_spec.rb +5 -19
  384. data/spec/functional/resource/remote_file_spec.rb +14 -0
  385. data/spec/functional/resource/rpm_spec.rb +122 -0
  386. data/spec/functional/resource/template_spec.rb +11 -44
  387. data/spec/functional/resource/user_spec.rb +2 -1
  388. data/spec/functional/run_lock_spec.rb +48 -5
  389. data/spec/functional/shell_spec.rb +46 -26
  390. data/spec/functional/tiny_server_spec.rb +2 -2
  391. data/spec/functional/version_spec.rb +35 -0
  392. data/spec/functional/win32/versions_spec.rb +3 -3
  393. data/spec/integration/client/client_spec.rb +146 -0
  394. data/spec/integration/knife/chef_fs_data_store_spec.rb +353 -0
  395. data/spec/integration/knife/chef_repo_path_spec.rb +72 -19
  396. data/spec/integration/knife/common_options_spec.rb +103 -0
  397. data/spec/integration/knife/download_spec.rb +38 -2
  398. data/spec/integration/knife/raw_spec.rb +63 -0
  399. data/spec/integration/knife/upload_spec.rb +20 -4
  400. data/spec/integration/solo/solo_spec.rb +78 -25
  401. data/spec/spec_helper.rb +35 -1
  402. data/spec/support/lib/chef/provider/easy.rb +4 -4
  403. data/spec/support/lib/chef/provider/snakeoil.rb +4 -4
  404. data/spec/support/lib/chef/resource/cat.rb +5 -5
  405. data/spec/support/lib/chef/resource/with_state.rb +37 -0
  406. data/spec/support/lib/library_load_order.rb +22 -0
  407. data/spec/support/platform_helpers.rb +8 -0
  408. data/spec/support/shared/functional/file_resource.rb +4 -22
  409. data/spec/support/shared/functional/windows_script.rb +48 -0
  410. data/spec/support/shared/integration/integration_helper.rb +5 -22
  411. data/spec/support/shared/integration/knife_support.rb +3 -3
  412. data/spec/support/shared/unit/script_resource.rb +7 -7
  413. data/spec/support/shared/unit/windows_script_resource.rb +7 -7
  414. data/spec/tiny_server.rb +2 -2
  415. data/spec/unit/api_client/registration_spec.rb +1 -1
  416. data/spec/unit/api_client_spec.rb +25 -2
  417. data/spec/unit/application/apply.rb +1 -9
  418. data/spec/unit/application/client_spec.rb +19 -44
  419. data/spec/unit/application/solo_spec.rb +10 -50
  420. data/spec/unit/application_spec.rb +51 -80
  421. data/spec/unit/checksum/storage/filesystem_spec.rb +3 -2
  422. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +47 -0
  423. data/spec/unit/chef_spec.rb +2 -2
  424. data/spec/unit/client_spec.rb +2 -18
  425. data/spec/unit/config_fetcher_spec.rb +98 -0
  426. data/spec/unit/config_spec.rb +107 -29
  427. data/spec/unit/cookbook/metadata_spec.rb +50 -50
  428. data/spec/unit/cookbook/synchronizer_spec.rb +3 -3
  429. data/spec/unit/cookbook/syntax_check_spec.rb +1 -2
  430. data/spec/unit/cookbook_loader_spec.rb +28 -12
  431. data/spec/unit/cookbook_manifest_spec.rb +11 -11
  432. data/spec/unit/cookbook_site_streaming_uploader.rb +200 -0
  433. data/spec/unit/cookbook_version_spec.rb +16 -0
  434. data/spec/unit/daemon_spec.rb +0 -132
  435. data/spec/unit/data_bag_item_spec.rb +6 -6
  436. data/spec/unit/data_bag_spec.rb +6 -8
  437. data/spec/unit/digester_spec.rb +2 -2
  438. data/spec/unit/encrypted_data_bag_item_spec.rb +0 -15
  439. data/spec/unit/file_cache_spec.rb +1 -1
  440. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +4 -4
  441. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +2 -2
  442. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +2 -2
  443. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +2 -2
  444. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +2 -2
  445. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +4 -4
  446. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +2 -2
  447. data/spec/unit/handler_spec.rb +5 -5
  448. data/spec/unit/http/ssl_policies_spec.rb +170 -0
  449. data/spec/unit/knife/bootstrap_spec.rb +31 -14
  450. data/spec/unit/knife/client_bulk_delete_spec.rb +8 -8
  451. data/spec/unit/knife/client_create_spec.rb +2 -2
  452. data/spec/unit/knife/client_delete_spec.rb +2 -2
  453. data/spec/unit/knife/client_edit_spec.rb +2 -2
  454. data/spec/unit/knife/client_list_spec.rb +2 -2
  455. data/spec/unit/knife/client_reregister_spec.rb +2 -2
  456. data/spec/unit/knife/client_show_spec.rb +2 -2
  457. data/spec/unit/knife/config_file_selection_spec.rb +53 -36
  458. data/spec/unit/knife/configure_spec.rb +0 -6
  459. data/spec/unit/knife/cookbook_create_spec.rb +1 -12
  460. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +2 -2
  461. data/spec/unit/knife/cookbook_show_spec.rb +3 -3
  462. data/spec/unit/knife/cookbook_site_install_spec.rb +1 -1
  463. data/spec/unit/knife/core/bootstrap_context_spec.rb +10 -2
  464. data/spec/unit/knife/core/ui_spec.rb +118 -0
  465. data/spec/unit/knife/data_bag_show_spec.rb +2 -2
  466. data/spec/unit/knife/environment_from_file_spec.rb +2 -2
  467. data/spec/unit/knife/index_rebuild_spec.rb +1 -1
  468. data/spec/unit/knife/node_delete_spec.rb +3 -3
  469. data/spec/unit/knife/node_edit_spec.rb +35 -8
  470. data/spec/unit/knife/node_list_spec.rb +3 -3
  471. data/spec/unit/knife/node_run_list_add_spec.rb +3 -3
  472. data/spec/unit/knife/node_show_spec.rb +3 -3
  473. data/spec/unit/knife/role_create_spec.rb +3 -3
  474. data/spec/unit/knife/role_delete_spec.rb +3 -3
  475. data/spec/unit/knife/role_list_spec.rb +2 -2
  476. data/spec/unit/knife/ssh_spec.rb +1 -8
  477. data/spec/unit/knife_spec.rb +0 -2
  478. data/spec/unit/log_spec.rb +2 -2
  479. data/spec/unit/mash_spec.rb +2 -2
  480. data/spec/unit/mixin/checksum_spec.rb +3 -3
  481. data/spec/unit/mixin/command_spec.rb +1 -1
  482. data/spec/unit/mixin/convert_to_class_name_spec.rb +7 -7
  483. data/spec/unit/mixin/deprecation_spec.rb +2 -2
  484. data/spec/unit/mixin/params_validate_spec.rb +72 -72
  485. data/spec/unit/mixin/securable_spec.rb +0 -14
  486. data/spec/unit/mixin/shell_out_spec.rb +1 -1
  487. data/spec/unit/mixin/template_spec.rb +34 -0
  488. data/spec/unit/mixin/windows_architecture_helper_spec.rb +5 -5
  489. data/spec/unit/mixin/xml_escape_spec.rb +2 -2
  490. data/spec/unit/node/attribute_spec.rb +11 -11
  491. data/spec/unit/node/immutable_collections_spec.rb +2 -2
  492. data/spec/unit/node_spec.rb +5 -0
  493. data/spec/unit/platform_spec.rb +36 -35
  494. data/spec/unit/provider/cron/{solaris_spec.rb → unix_spec.rb} +6 -6
  495. data/spec/unit/provider/cron_spec.rb +21 -3
  496. data/spec/unit/provider/deploy/timestamped_spec.rb +5 -5
  497. data/spec/unit/provider/deploy_spec.rb +21 -7
  498. data/spec/unit/provider/env_spec.rb +2 -2
  499. data/spec/unit/provider/execute_spec.rb +2 -2
  500. data/spec/unit/provider/file/content_spec.rb +0 -8
  501. data/spec/unit/provider/git_spec.rb +29 -9
  502. data/spec/unit/provider/group/dscl_spec.rb +12 -12
  503. data/spec/unit/provider/group/gpasswd_spec.rb +2 -2
  504. data/spec/unit/provider/group/groupadd_spec.rb +14 -0
  505. data/spec/unit/provider/group/groupmod_spec.rb +13 -13
  506. data/spec/unit/provider/group/pw_spec.rb +16 -16
  507. data/spec/unit/provider/group/usermod_spec.rb +10 -9
  508. data/spec/unit/provider/group/windows_spec.rb +14 -0
  509. data/spec/unit/provider/group_spec.rb +29 -29
  510. data/spec/unit/provider/http_request_spec.rb +15 -15
  511. data/spec/unit/provider/ifconfig/aix_spec.rb +180 -0
  512. data/spec/unit/provider/ifconfig_spec.rb +9 -9
  513. data/spec/unit/provider/link_spec.rb +2 -2
  514. data/spec/unit/provider/log_spec.rb +8 -8
  515. data/spec/unit/provider/mdadm_spec.rb +14 -11
  516. data/spec/unit/provider/mount/aix_spec.rb +237 -0
  517. data/spec/unit/provider/mount/mount_spec.rb +2 -0
  518. data/spec/unit/provider/mount/windows_spec.rb +2 -2
  519. data/spec/unit/provider/mount_spec.rb +6 -6
  520. data/spec/unit/provider/package/aix_spec.rb +171 -0
  521. data/spec/unit/provider/package/apt_spec.rb +130 -171
  522. data/spec/unit/provider/package/dpkg_spec.rb +3 -3
  523. data/spec/unit/provider/package/freebsd_spec.rb +28 -0
  524. data/spec/unit/provider/package/ips_spec.rb +1 -1
  525. data/spec/unit/provider/package/rpm_spec.rb +15 -15
  526. data/spec/unit/provider/package/smartos_spec.rb +21 -3
  527. data/spec/unit/provider/package_spec.rb +4 -2
  528. data/spec/unit/provider/powershell_spec.rb +3 -3
  529. data/spec/unit/provider/remote_directory_spec.rb +2 -2
  530. data/spec/unit/provider/remote_file/ftp_spec.rb +0 -5
  531. data/spec/unit/provider/remote_file/http_spec.rb +12 -28
  532. data/spec/unit/provider/remote_file/local_file_spec.rb +2 -1
  533. data/spec/unit/provider/route_spec.rb +2 -2
  534. data/spec/unit/provider/ruby_block_spec.rb +2 -2
  535. data/spec/unit/provider/service/arch_service_spec.rb +17 -17
  536. data/spec/unit/provider/service/debian_service_spec.rb +242 -152
  537. data/spec/unit/provider/service/freebsd_service_spec.rb +9 -9
  538. data/spec/unit/provider/service/gentoo_service_spec.rb +9 -9
  539. data/spec/unit/provider/service/init_service_spec.rb +11 -11
  540. data/spec/unit/provider/service/insserv_service_spec.rb +5 -5
  541. data/spec/unit/provider/service/invokercd_service_spec.rb +10 -10
  542. data/spec/unit/provider/service/redhat_spec.rb +6 -6
  543. data/spec/unit/provider/service/simple_service_spec.rb +6 -6
  544. data/spec/unit/provider/service/solaris_smf_service_spec.rb +4 -4
  545. data/spec/unit/provider/service/systemd_service_spec.rb +3 -3
  546. data/spec/unit/provider/service/upstart_service_spec.rb +5 -5
  547. data/spec/unit/provider/service/windows_spec.rb +7 -7
  548. data/spec/unit/provider/subversion_spec.rb +1 -1
  549. data/spec/unit/provider/user/dscl_spec.rb +21 -21
  550. data/spec/unit/provider/user/pw_spec.rb +2 -2
  551. data/spec/unit/provider/user/windows_spec.rb +5 -5
  552. data/spec/unit/provider/user_spec.rb +39 -47
  553. data/spec/unit/resource/apt_package_spec.rb +6 -6
  554. data/spec/unit/resource/bash_spec.rb +5 -5
  555. data/spec/unit/resource/batch_spec.rb +7 -7
  556. data/spec/unit/resource/breakpoint_spec.rb +8 -8
  557. data/spec/unit/resource/chef_gem_spec.rb +6 -6
  558. data/spec/unit/resource/cookbook_file_spec.rb +11 -11
  559. data/spec/unit/resource/cron_spec.rb +15 -15
  560. data/spec/unit/resource/csh_spec.rb +5 -5
  561. data/spec/unit/resource/deploy_revision_spec.rb +6 -6
  562. data/spec/unit/resource/deploy_spec.rb +50 -36
  563. data/spec/unit/resource/directory_spec.rb +1 -1
  564. data/spec/unit/resource/dpkg_package_spec.rb +6 -6
  565. data/spec/unit/resource/env_spec.rb +1 -1
  566. data/spec/unit/resource/erl_call_spec.rb +1 -1
  567. data/spec/unit/resource/freebsd_package_spec.rb +6 -6
  568. data/spec/unit/resource/gem_package_spec.rb +6 -6
  569. data/spec/unit/resource/git_spec.rb +8 -8
  570. data/spec/unit/resource/group_spec.rb +11 -11
  571. data/spec/unit/resource/http_request_spec.rb +7 -7
  572. data/spec/unit/resource/ifconfig_spec.rb +1 -1
  573. data/spec/unit/resource/ips_package_spec.rb +6 -6
  574. data/spec/unit/resource/link_spec.rb +1 -1
  575. data/spec/unit/resource/log_spec.rb +13 -10
  576. data/spec/unit/resource/macports_package_spec.rb +2 -2
  577. data/spec/unit/resource/mdadm_spec.rb +3 -3
  578. data/spec/unit/resource/mount_spec.rb +13 -13
  579. data/spec/unit/resource/ohai_spec.rb +1 -1
  580. data/spec/unit/resource/package_spec.rb +6 -6
  581. data/spec/unit/resource/pacman_package_spec.rb +6 -6
  582. data/spec/unit/resource/perl_spec.rb +5 -5
  583. data/spec/unit/resource/portage_package_spec.rb +6 -6
  584. data/spec/unit/resource/powershell_spec.rb +5 -5
  585. data/spec/unit/resource/python_spec.rb +5 -5
  586. data/spec/unit/resource/registry_key_spec.rb +2 -2
  587. data/spec/unit/resource/remote_directory_spec.rb +9 -9
  588. data/spec/unit/resource/remote_file_spec.rb +4 -4
  589. data/spec/unit/resource/route_spec.rb +13 -13
  590. data/spec/unit/resource/rpm_package_spec.rb +2 -2
  591. data/spec/unit/resource/ruby_block_spec.rb +4 -4
  592. data/spec/unit/resource/ruby_spec.rb +5 -5
  593. data/spec/unit/resource/scm_spec.rb +14 -1
  594. data/spec/unit/resource/script_spec.rb +5 -5
  595. data/spec/unit/resource/service_spec.rb +18 -18
  596. data/spec/unit/resource/smartos_package_spec.rb +6 -6
  597. data/spec/unit/resource/solaris_package_spec.rb +57 -0
  598. data/spec/unit/resource/subversion_spec.rb +6 -6
  599. data/spec/unit/resource/timestamped_deploy_spec.rb +4 -4
  600. data/spec/unit/resource/user_spec.rb +13 -13
  601. data/spec/unit/resource/yum_package_spec.rb +7 -7
  602. data/spec/unit/resource_collection/stepable_iterator_spec.rb +21 -21
  603. data/spec/unit/resource_definition_spec.rb +23 -23
  604. data/spec/unit/resource_reporter_spec.rb +27 -0
  605. data/spec/unit/rest/auth_credentials_spec.rb +0 -94
  606. data/spec/unit/rest_spec.rb +117 -99
  607. data/spec/unit/role_spec.rb +57 -4
  608. data/spec/unit/run_context/cookbook_compiler_spec.rb +4 -20
  609. data/spec/unit/run_context_spec.rb +44 -3
  610. data/spec/unit/run_list/run_list_item_spec.rb +1 -1
  611. data/spec/unit/run_lock_spec.rb +6 -3
  612. data/spec/unit/scan_access_control_spec.rb +2 -2
  613. data/spec/unit/search/query_spec.rb +3 -3
  614. data/spec/unit/util/backup_spec.rb +6 -13
  615. data/spec/unit/util/diff_spec.rb +36 -53
  616. data/spec/unit/version/platform_spec.rb +3 -3
  617. data/spec/unit/version_class_spec.rb +5 -5
  618. data/spec/unit/version_constraint/platform_spec.rb +2 -2
  619. data/spec/unit/windows_service_spec.rb +54 -0
  620. metadata +290 -108
  621. checksums.yaml +0 -7
  622. data/distro/common/man/man1/knife-index.1 +0 -29
  623. data/distro/common/man/man8/chef-expander.8 +0 -97
  624. data/distro/common/man/man8/chef-expanderctl.8 +0 -62
  625. data/distro/common/man/man8/chef-server-webui.8 +0 -155
  626. data/distro/common/man/man8/chef-server.8 +0 -147
  627. data/distro/common/man/man8/chef-solr.8 +0 -122
  628. data/lib/chef/chef_fs/raw_request.rb +0 -79
@@ -1,332 +1,642 @@
1
- .\" generated with Ronn/v0.7.3
2
- .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
- .
4
- .TH "KNIFE\-COOKBOOK" "1" "October 2013" "Chef 11.6.2" "Chef Manual"
5
- .
6
- .SH "NAME"
7
- \fBknife\-cookbook\fR \- upload and manage chef cookbooks
8
- .
9
- .SH "SYNOPSIS"
10
- \fBknife\fR \fBcookbook\fR \fIsub\-command\fR \fI(options)\fR
11
- .
12
- .SH "SUB\-COMMANDS"
13
- \fBknife cookbook\fR supports the following sub commands:
14
- .
15
- .SH "LIST"
16
- \fBknife cookbook list\fR \fI(options)\fR
17
- .
18
- .TP
19
- \fB\-a\fR, \fB\-\-all\fR
20
- show all versions of a cookbook instead of just the most recent
21
- .
22
- .TP
23
- \fB\-w\fR, \fB\-\-with\-uri\fR
24
- show corresponding uris
25
- .
26
- .P
27
- Lists the cookbooks available on the Chef server\.
28
- .
29
- .SH "SHOW"
30
- \fBknife cookbook show cookbook [version] [part] [filename]\fR \fI(options)\fR
31
- .
32
- .TP
33
- \fB\-f\fR, \fB\-\-fqdn fqdn\fR
34
- the fqdn of the host to see the file for
35
- .
36
- .TP
37
- \fB\-p\fR, \fB\-\-platform platform\fR
38
- the platform to see the file for
39
- .
40
- .TP
41
- \fB\-v\fR, \fB\-\-platform\-version version\fR
42
- the platform version to see the file for
43
- .
1
+ .TH "KNIFE-COOKBOOK" "1" "Chef 11.8.0" "" "knife cookbook"
2
+ .SH NAME
3
+ knife-cookbook \- The man page for the knife cookbook subcommand.
4
+ .
5
+ .nr rst2man-indent-level 0
6
+ .
7
+ .de1 rstReportMargin
8
+ \\$1 \\n[an-margin]
9
+ level \\n[rst2man-indent-level]
10
+ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11
+ -
12
+ \\n[rst2man-indent0]
13
+ \\n[rst2man-indent1]
14
+ \\n[rst2man-indent2]
15
+ ..
16
+ .de1 INDENT
17
+ .\" .rstReportMargin pre:
18
+ . RS \\$1
19
+ . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20
+ . nr rst2man-indent-level +1
21
+ .\" .rstReportMargin post:
22
+ ..
23
+ .de UNINDENT
24
+ . RE
25
+ .\" indent \\n[an-margin]
26
+ .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27
+ .nr rst2man-indent-level -1
28
+ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29
+ .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30
+ ..
31
+ .\" Man page generated from reStructuredText.
32
+ .
33
+ .sp
34
+ A cookbook is the fundamental unit of configuration and policy distribution. Each cookbook defines a scenario, such as everything needed to install and configure MySQL, and then it contains all of the components that are required to support that scenario, including:
35
+ .INDENT 0.0
36
+ .IP \(bu 2
37
+ Attribute values that are set on nodes
38
+ .IP \(bu 2
39
+ Definitions that allow the creation of reusable collections of resources
40
+ .IP \(bu 2
41
+ File distributions
42
+ .IP \(bu 2
43
+ Libraries that extend the chef\-client and/or provide helpers to Ruby code
44
+ .IP \(bu 2
45
+ Recipes that specify which resources to manage and the order in which those resources will be applied
46
+ .IP \(bu 2
47
+ Custom resources and providers
48
+ .IP \(bu 2
49
+ Templates
50
+ .IP \(bu 2
51
+ Versions
52
+ .IP \(bu 2
53
+ Metadata about recipes (including dependencies), version constraints, supported platforms, and so on
54
+ .UNINDENT
55
+ .sp
56
+ The \fBknife cookbook\fP subcommand is used to interact with cookbooks that are located on the server or the local chef\-repo.
57
+ .sp
58
+ This subcommand has the following syntax:
59
+ .sp
60
+ .nf
61
+ .ft C
62
+ $ knife cookbook [ARGUMENT] (options)
63
+ .ft P
64
+ .fi
65
+ .SH COMMON OPTIONS
66
+ .sp
67
+ The following options can be run with all Knife sub\-commands and plug\-ins:
68
+ .INDENT 0.0
44
69
  .TP
45
- \fB\-w\fR, \fB\-\-with\-uri\fR
46
- Show corresponding URIs
47
- .
48
- .P
49
- show a particular part of a \fIcookbook\fR for the specified \fIversion\fR\. \fIpart\fR can be one of:
50
- .
51
- .IP "\(bu" 4
52
- \fIattributes\fR
53
- .
54
- .IP "\(bu" 4
55
- \fIdefinitions\fR
56
- .
57
- .IP "\(bu" 4
58
- \fIfiles\fR
59
- .
60
- .IP "\(bu" 4
61
- \fIlibraries\fR
62
- .
63
- .IP "\(bu" 4
64
- \fIproviders\fR
65
- .
66
- .IP "\(bu" 4
67
- \fIrecipes\fR
68
- .
69
- .IP "\(bu" 4
70
- \fIresources\fR
71
- .
72
- .IP "\(bu" 4
73
- \fItemplates\fR
74
- .
75
- .IP "" 0
76
- .
77
- .SH "UPLOAD"
78
- \fBknife cookbook upload [cookbooks\.\.\.]\fR \fI(options)\fR
79
- .
70
+ .B \fB\-c CONFIG\fP, \fB\-\-config CONFIG\fP
71
+ The configuration file to use.
80
72
  .TP
81
- \fB\-a\fR, \fB\-\-all\fR
82
- upload all cookbooks, rather than just a single cookbook
83
- .
73
+ .B \fB\-\-color\fP
74
+ Indicates that colored output will be used.
84
75
  .TP
85
- \fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
86
- a colon\-separated path to look for cookbooks in
87
- .
76
+ .B \fB\-d\fP, \fB\-\-disable\-editing\fP
77
+ Indicates that $EDITOR will not be opened; data will be accepted as\-is.
88
78
  .TP
89
- \fB\-d\fR, \fB\-\-upload\-dependencies\fR
90
- Uploads additional cookbooks that this cookbook lists in as dependencies in its metadata\.
91
- .
79
+ .B \fB\-\-defaults\fP
80
+ Indicates that Knife will use the default value, instead of asking a user to provide one.
92
81
  .TP
93
- \fB\-E\fR, \fB\-\-environment ENVIRONMENT\fR
94
- An \fIENVIRONMENT\fR to apply the uploaded cookbooks to\. Specifying this option will cause knife to edit the \fIENVIRONMENT\fR to place a strict version constraint on the cookbook version(s) uploaded\.
95
- .
82
+ .B \fB\-e EDITOR\fP, \fB\-\-editor EDITOR\fP
83
+ The $EDITOR that is used for all interactive commands.
96
84
  .TP
97
- \fB\-\-freeze\fR
98
- Sets the frozen flag on the uploaded cookbook(s) Any future attempt to modify the cookbook without changing the version number will return an error unless \-\-force is specified\.
99
- .
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.
100
87
  .TP
101
- \fB\-\-force\fR
102
- Overrides the frozen flag on a cookbook, allowing you to overwrite a cookbook version that has previously been uploaded with the \-\-freeze option\.
103
- .
104
- .P
105
- Uploads one or more cookbooks from your local cookbook repository(ies) to the Chef Server\. Only files that don\'t yet exist on the server will be uploaded\.
106
- .
107
- .P
108
- As the command parses the name args as 1\.\.n cookbook names: \fBknife cookbook upload COOKBOOK COOKBOOK \.\.\.\fR works for one to many cookbooks\.
109
- .
110
- .SH "DOWNLOAD"
111
- \fBknife cookbook download cookbook [version]\fR \fI(options)\fR
112
- .
88
+ .B \fB\-f FILE_NAME\fP, \fB\-\-file FILE_NAME\fP
89
+ Indicates that the private key will be saved to a specified file name.
113
90
  .TP
114
- \fB\-d\fR, \fB\-\-dir download_directory\fR
115
- the directory to download the cookbook into
116
- .
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.
117
93
  .TP
118
- \fB\-f\fR, \fB\-\-force\fR
119
- overwrite an existing directory with the download
120
- .
94
+ .B \fB\-h\fP, \fB\-\-help\fP
95
+ Shows help for the command.
121
96
  .TP
122
- \fB\-n\fR, \fB\-\-latest\fR
123
- download the latest version of the cookbook
124
- .
125
- .P
126
- download a cookbook from the chef server\. if no version is specified and only one version exists on the server, that version will be downloaded\. if no version is specified and multiple versions are available on the server, you will be prompted for a version to download\.
127
- .
128
- .SH "DELETE"
129
- \fBknife cookbook delete cookbook [version]\fR \fI(options)\fR
130
- .
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 server.
131
99
  .TP
132
- \fB\-a\fR, \fB\-\-all\fR
133
- delete all versions
134
- .
100
+ .B \fB\-\-no\-color\fP
101
+ Indicates that color will not be used in the output.
135
102
  .TP
136
- \fB\-p\fR, \fB\-\-purge\fR
137
- purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\.
138
- .
139
- .P
140
- delete the specified \fIversion\fR of the named \fIcookbook\fR\. if no version is specified, and only one version exists on the server, that version will be deleted\. if multiple versions are available on the server, you will be prompted for a version to delete\.
141
- .
142
- .SH "BULK DELETE"
143
- \fBknife cookbook bulk delete regex\fR \fI(options)\fR
144
- .
103
+ .B \fB\-p PASSWORD\fP, \fB\-\-password PASSWORD\fP
104
+ The user password.
145
105
  .TP
146
- \fB\-p\fR, \fB\-\-purge\fR
147
- purge files from backing store\. this will disable any cookbook that contains any of the same files as the cookbook being purged\.
148
- .
149
- .P
150
- delete cookbooks on the chef server based on a regular expression\. the regular expression (\fIregex\fR) should be in quotes, not in //\'s\.
151
- .
152
- .SH "COOKBOOK CREATE"
153
- \fBknife cookbook create cookbook\fR \fI(options)\fR
154
- .
106
+ .B \fB\-\-print\-after\fP
107
+ Indicates that data will be shown after a destructive operation.
155
108
  .TP
156
- \fB\-o\fR, \fB\-\-cookbook\-path path\fR
157
- the directory where the cookbook will be created
158
- .
109
+ .B \fB\-s URL\fP, \fB\-\-server\-url URL\fP
110
+ The URL for the server.
159
111
  .TP
160
- \fB\-r\fR, \fB\-\-readme\-format format\fR
161
- format of the readme file md, mkd, txt, rdoc
162
- .
112
+ .B \fB\-u USER\fP, \fB\-\-user USER\fP
113
+ The user name used by Knife to sign requests made by the API client to the server. Authentication will fail if the user name does not match the private key.
163
114
  .TP
164
- \fB\-c\fR, \fB\-\-copyright copyright\fR
165
- name of copyright holder
166
- .
115
+ .B \fB\-v\fP, \fB\-\-version\fP
116
+ The version of the chef\-client.
167
117
  .TP
168
- \fB\-i\fR, \fB\-\-license license\fR
169
- license for cookbook, apachev2 or none
170
- .
118
+ .B \fB\-V\fP, \fB\-\-verbose\fP
119
+ Set for more verbose outputs. Use \fB\-VV\fP for maximum verbosity.
171
120
  .TP
172
- \fB\-e\fR, \fB\-\-email email\fR
173
- email address of cookbook maintainer
174
- .
175
- .P
176
- this is a helper command that creates a new cookbook directory in the \fBcookbook_path\fR\. the following directories and files are created for the named cookbook\.
177
- .
178
- .IP "\(bu" 4
121
+ .B \fB\-y\fP, \fB\-\-yes\fP
122
+ Indicates that the response to all confirmation prompts will be "Yes" (and that Knife will not ask for confirmation).
123
+ .UNINDENT
124
+ .SH BULK DELETE
125
+ .sp
126
+ The \fBbulk delete\fP argument is used to delete cookbook files that match a pattern defined by a regular expression. The regular expression must be within quotes and not be surrounded by forward slashes (/).
127
+ .sp
128
+ \fBSyntax\fP
129
+ .sp
130
+ This argument has the following syntax:
131
+ .sp
132
+ .nf
133
+ .ft C
134
+ $ knife cookbook bulk delete REGEX (options)
135
+ .ft P
136
+ .fi
137
+ .sp
138
+ \fBOptions\fP
139
+ .sp
140
+ This argument has the following options:
141
+ .INDENT 0.0
142
+ .TP
143
+ .B \fB\-p\fP, \fB\-\-purge\fP
144
+ Indicates that a cookbook (or cookbook version) will be removed entirely from the server. This action should be used carefully because only one copy of any single file is stored on the server. Consequently, purging a cookbook will disable any other cookbook that references one or more files from a cookbook that has been purged.
145
+ .UNINDENT
146
+ .sp
147
+ \fBExamples\fP
148
+ .sp
149
+ To bulk delete many cookbooks, use a regular expression to define the pattern:
150
+ .sp
151
+ .nf
152
+ .ft C
153
+ $ knife cookbook bulk delete "^[0\-9]{3}$" \-p
154
+ .ft P
155
+ .fi
156
+ .SH CREATE
157
+ .sp
158
+ The \fBcreate\fP argument is used to create a new cookbook directory on the local machine, including the following directories and files:
159
+ .INDENT 0.0
160
+ .INDENT 3.5
161
+ .INDENT 0.0
162
+ .IP \(bu 2
179
163
  cookbook/attributes
180
- .
181
- .IP "\(bu" 4
164
+ .IP \(bu 2
165
+ cookbook/CHANGELOG.md
166
+ .IP \(bu 2
182
167
  cookbook/definitions
183
- .
184
- .IP "\(bu" 4
168
+ .IP \(bu 2
185
169
  cookbook/files/default
186
- .
187
- .IP "\(bu" 4
170
+ .IP \(bu 2
188
171
  cookbook/libraries
189
- .
190
- .IP "\(bu" 4
191
- cookbook/metadata\.rb
192
- .
193
- .IP "\(bu" 4
172
+ .IP \(bu 2
173
+ cookbook/metadata.rb
174
+ .IP \(bu 2
194
175
  cookbook/providers
195
- .
196
- .IP "\(bu" 4
197
- cookbook/readme\.md
198
- .
199
- .IP "\(bu" 4
200
- cookbook/recipes/default\.rb
201
- .
202
- .IP "\(bu" 4
176
+ .IP \(bu 2
177
+ cookbook/README.md (or .rdoc)
178
+ .IP \(bu 2
179
+ cookbook/recipes/default.rb
180
+ .IP \(bu 2
203
181
  cookbook/resources
204
- .
205
- .IP "\(bu" 4
182
+ .IP \(bu 2
206
183
  cookbook/templates/default
207
- .
208
- .IP "" 0
209
- .
210
- .P
211
- supported readme formats are \'md\' (default), \'mkd\', \'txt\', \'rdoc\'\. the readme file will be written with the specified extension and a set of helpful starting headers\.
212
- .
213
- .P
214
- specify \fB\-c\fR or \fB\-\-copyright\fR with the name of the copyright holder as your name or your company/organization name in a quoted string\. if this value is not specified an all\-caps string \fByour_company_name\fR is used which can be easily changed with find/replace\.
215
- .
216
- .P
217
- specify \fB\-i\fR or \fB\-\-license\fR with the license that the cookbook is distributed under for sharing with other people or posting to the opscode cookbooks site\. be aware of the licenses of files you put inside the cookbook and follow any restrictions they describe\. when using \fBnone\fR (default) or \fBapachev2\fR, comment header text and metadata file are pre\-filled\. the \fBnone\fR license will be treated as non\-redistributable\.
218
- .
219
- .P
220
- specify \fB\-e\fR or \fB\-\-email\fR with the email address of the cookbook\'s maintainer\. if this value is not specified, an all\-caps string \fByour_email\fR is used which can easily be changed with find/replace\.
221
- .
222
- .P
223
- the cookbook copyright, license, email and readme_format settings can be filled in the \fBknife\.rb\fR, for example with default values:
224
- .
225
- .IP "" 4
226
- .
184
+ .UNINDENT
185
+ .UNINDENT
186
+ .UNINDENT
187
+ .sp
188
+ After the cookbook is created, it can be uploaded to the server using the \fBknife upload\fP argument.
189
+ .sp
190
+ \fBSyntax\fP
191
+ .sp
192
+ This argument has the following syntax:
193
+ .sp
227
194
  .nf
228
-
229
- cookbook_copyright "your_company_name"
230
- cookbook_license "none"
231
- cookbook_email "your_email"
232
- readme_format "md"
233
- .
195
+ .ft C
196
+ $ knife cookbook create COOKBOOK_NAME (options)
197
+ .ft P
234
198
  .fi
199
+ .sp
200
+ \fBOptions\fP
201
+ .sp
202
+ This argument has the following options:
203
+ .INDENT 0.0
204
+ .TP
205
+ .B \fB\-C COPYRIGHT_HOLDER\fP, \fB\-\-copyright COPYRIGHT_HOLDER\fP
206
+ The name of the copyright holder. This option will place a copyright notice that contains the name of the copyright holder in each of the pre\-created files. If this option is not specified, a copyright name of "your_company_name" will be used instead; it can be easily modified later.
207
+ .TP
208
+ .B \fB\-I LICENSE\fP, \fB\-\-license LICENSE\fP
209
+ The type of license under which a cookbook is distributed: \fBapachev2\fP, \fBgplv2\fP, \fBgplv3\fP, \fBmit\fP, or \fBnone\fP (default). This option will place the appropriate license notice in the pre\-created files. Be aware of the licenses for files inside of a cookbook and be sure to follow any restrictions they describe.
210
+ .TP
211
+ .B \fB\-m EMAIL\fP, \fB\-\-email EMAIL\fP
212
+ The email address for the individual who maintains the cookbook. This option will place an email address in each of the pre\-created files. If this option is not specified, an email name of "your_email" will be used instead; it can be easily modified later.
213
+ .TP
214
+ .B \fB\-o PATH\fP, \fB\-\-cookbook\-path PATH\fP
215
+ The directory in which cookbook are created. This can be a colon\-separated path.
216
+ .TP
217
+ .B \fB\-r FORMAT\fP, \fB\-\-readme\-format FORMAT\fP
218
+ The document format of the readme file: \fBmd\fP (markdown) and \fBrdoc\fP (Ruby docs).
219
+ .UNINDENT
220
+ .sp
221
+ \fBExamples\fP
222
+ .sp
223
+ To create a cookbook named "my_cookbook" with copyright, email, license, and readme format options specified, enter:
224
+ .sp
225
+ .nf
226
+ .ft C
227
+ $ knife cookbook create my_cookbook \-C "My Name" \-m "my@email.com" \-I apachev2 \-r md
228
+ .ft P
229
+ .fi
230
+ .sp
231
+ to return something like:
232
+ .sp
233
+ .nf
234
+ .ft C
235
+ ** Creating cookbook my_cookbook
236
+ ** Creating README for cookbook: my_cookbook
237
+ ** Creating metadata for cookbook: my_cookbook
238
+ .ft P
239
+ .fi
240
+ .SH DELETE
241
+ .sp
242
+ The \fBdelete\fP argument is used to delete a specified cookbook or cookbook version on the server (and not locally).
243
+ .sp
244
+ \fBSyntax\fP
245
+ .sp
246
+ This argument has the following syntax:
247
+ .sp
248
+ .nf
249
+ .ft C
250
+ $ knife cookbook delete COOKBOOK_NAME [COOKBOOK_VERSION] (options)
251
+ .ft P
252
+ .fi
253
+ .sp
254
+ \fBOptions\fP
255
+ .sp
256
+ This argument has the following options:
257
+ .INDENT 0.0
258
+ .TP
259
+ .B \fB\-a\fP, \fB\-\-all\fP
260
+ Indicates that a cookbook and every version of that cookbook will be deleted.
261
+ .TP
262
+ .B \fBCOOKBOOK_VERSION\fP
263
+ The version of a cookbook to be deleted. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, Knife will prompt for a version.
264
+ .TP
265
+ .B \fB\-p\fP, \fB\-\-purge\fP
266
+ Indicates that a cookbook (or cookbook version) will be removed entirely from the server. This action should be used carefully because only one copy of any single file is stored on the server. Consequently, purging a cookbook will disable any other cookbook that references one or more files from a cookbook that has been purged.
267
+ .UNINDENT
268
+ .sp
269
+ \fBExamples\fP
270
+ .sp
271
+ To delete version "0.8" from a cookbook named "smartmon", enter:
272
+ .sp
273
+ .nf
274
+ .ft C
275
+ $ knife cookbook delete smartmon 0.8
276
+ .ft P
277
+ .fi
278
+ .sp
279
+ Type \fBY\fP to confirm a deletion.
280
+ .SH DOWNLOAD
281
+ .sp
282
+ The \fBdownload\fP argument is used to download a cookbook from the server to the current working directory.
283
+ .sp
284
+ \fBSyntax\fP
285
+ .sp
286
+ This argument has the following syntax:
287
+ .sp
288
+ .nf
289
+ .ft C
290
+ $ knife cookbook download COOKBOOK_NAME [COOKBOOK_VERSION] (options)
291
+ .ft P
292
+ .fi
293
+ .sp
294
+ \fBOptions\fP
295
+ .sp
296
+ This argument has the following options:
297
+ .INDENT 0.0
298
+ .TP
299
+ .B \fB\-d DOWNLOAD_DIRECTORY\fP, \fB\-\-dir DOWNLOAD_DIRECTORY\fP
300
+ The directory into which a cookbook will be downloaded.
301
+ .TP
302
+ .B \fB\-f\fP, \fB\-\-force\fP
303
+ Indicates that an existing directory will be overwritten.
304
+ .TP
305
+ .B \fB\-N\fP, \fB\-\-latest\fP
306
+ Indicates that the most recent version of a cookbook will be downloaded.
307
+ .UNINDENT
308
+ .sp
309
+ \fBExamples\fP
310
+ .sp
311
+ To download a cookbook named "smartmon", enter:
312
+ .sp
313
+ .nf
314
+ .ft C
315
+ $ knife cookbook download smartmon
316
+ .ft P
317
+ .fi
318
+ .SH LIST
319
+ .sp
320
+ The \fBlist\fP argument is used to view a list of cookbooks that are currently available on the server. The list will contain only the most recent version for each cookbook by default.
321
+ .sp
322
+ \fBSyntax\fP
323
+ .sp
324
+ This argument has the following syntax:
325
+ .sp
326
+ .nf
327
+ .ft C
328
+ $ knife cookbook list (options)
329
+ .ft P
330
+ .fi
331
+ .sp
332
+ \fBOptions\fP
333
+ .sp
334
+ This argument has the following options:
335
+ .INDENT 0.0
336
+ .TP
337
+ .B \fB\-a\fP, \fB\-\-all\fP
338
+ Indicates that all available versions of each cookbook will be returned.
339
+ .TP
340
+ .B \fB\-w\fP, \fB\-\-with\-uri\fP
341
+ Indicates that the corresponding URIs will be shown.
342
+ .UNINDENT
343
+ .sp
344
+ \fBExamples\fP
345
+ .sp
346
+ To view a list of cookbooks:
347
+ .sp
348
+ .nf
349
+ .ft C
350
+ $ knife cookbook list
351
+ .ft P
352
+ .fi
353
+ .SH METADATA
354
+ .sp
355
+ The \fBmetadata\fP argument is used to generate the metadata for one or more cookbooks.
356
+ .sp
357
+ \fBSyntax\fP
358
+ .sp
359
+ This argument has the following syntax:
360
+ .sp
361
+ .nf
362
+ .ft C
363
+ $ knife cookbook metadata (options)
364
+ .ft P
365
+ .fi
366
+ .sp
367
+ \fBOptions\fP
368
+ .sp
369
+ This argument has the following options:
370
+ .INDENT 0.0
371
+ .TP
372
+ .B \fB\-a\fP, \fB\-\-all\fP
373
+ Indicates that metadata should be generated for all cookbooks, and not just for a specified cookbook.
374
+ .TP
375
+ .B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP
376
+ The directory in which cookbook are created. This can be a colon\-separated path.
377
+ .UNINDENT
378
+ .sp
379
+ \fBExamples\fP
380
+ .sp
381
+ To generate metadata for all cookbooks:
382
+ .sp
383
+ .nf
384
+ .ft C
385
+ $ knife cookbook metadata \-a
386
+ .ft P
387
+ .fi
388
+ .SH METADATA FROM FILE
389
+ .sp
390
+ The \fBmetadata from file\fP argument is used to load the metadata for a cookbook from a file.
391
+ .sp
392
+ \fBSyntax\fP
393
+ .sp
394
+ This argument has the following syntax:
395
+ .sp
396
+ .nf
397
+ .ft C
398
+ $ knife cookbook metadata from file FILE
399
+ .ft P
400
+ .fi
401
+ .sp
402
+ \fBOptions\fP
403
+ .sp
404
+ This command does not have any specific options.
405
+ .sp
406
+ \fBExamples\fP
407
+ .sp
408
+ To view cookbook metadata from a JSON file:
409
+ .sp
410
+ .nf
411
+ .ft C
412
+ $ knife cookbook metadta from file /path/to/file
413
+ .ft P
414
+ .fi
415
+ .SH SHOW
416
+ .sp
417
+ The \fBshow\fP argument is used to view information about a cookbook, parts of a cookbook (attributes, definitions, files, libraries, providers, recipes, resources, and templates), or a file that is associated with a cookbook (including attributes such as checksum or specificity).
418
+ .sp
419
+ \fBSyntax\fP
420
+ .sp
421
+ This argument has the following syntax:
422
+ .sp
423
+ .nf
424
+ .ft C
425
+ $ knife cookbook show COOKBOOK_NAME [COOKBOOK_VERSION] [PART...] [FILE_NAME] (options)
426
+ .ft P
427
+ .fi
428
+ .sp
429
+ \fBOptions\fP
430
+ .sp
431
+ This argument has the following options:
432
+ .INDENT 0.0
433
+ .TP
434
+ .B \fBCOOKBOOK_VERSION\fP
435
+ The version of a cookbook to be shown. If a cookbook has only one version, this option does not need to be specified. If a cookbook has more than one version and this option is not specified, a list of cookbook versions will be returned.
436
+ .TP
437
+ .B \fB\-f FQDN\fP, \fB\-\-fqdn FQDN\fP
438
+ The FQDN of the host.
439
+ .TP
440
+ .B \fBFILE_NAME\fP
441
+ The name of a file that is associated with a cookbook.
442
+ .TP
443
+ .B \fB\-p PLATFORM\fP, \fB\-\-platform PLATFORM\fP
444
+ The platform for which a cookbook is designed.
445
+ .TP
446
+ .B \fBPART\fP
447
+ The part of the cookbook to show: \fBattributes\fP, \fBdefinitions\fP, \fBfiles\fP, \fBlibraries\fP, \fBproviders\fP, \fBrecipes\fP, \fBresources\fP, or \fBtemplates\fP. More than one part can be specified.
448
+ .TP
449
+ .B \fB\-V PLATFORM_VERSION\fP, \fB\-\-platform\-version PLATFORM_VERSION\fP
450
+ The version of the platform.
451
+ .TP
452
+ .B \fB\-w\fP, \fB\-\-with\-uri\fP
453
+ Indicates that the corresponding URIs will be shown.
454
+ .UNINDENT
455
+ .sp
456
+ \fBExamples\fP
457
+ .sp
458
+ To get the list of available versions of a cookbook named "getting\-started", enter:
459
+ .sp
460
+ .nf
461
+ .ft C
462
+ $ knife cookbook show getting\-started
463
+ .ft P
464
+ .fi
465
+ .sp
466
+ to return something like:
467
+ .sp
468
+ .nf
469
+ .ft C
470
+ getting\-started 0.3.0 0.2.0
471
+ .ft P
472
+ .fi
473
+ .sp
474
+ To show a list of data about a cookbook using the name of the cookbook and the version, enter:
475
+ .sp
476
+ .nf
477
+ .ft C
478
+ $ knife cookbook show getting\-started 0.3.0
479
+ .ft P
480
+ .fi
481
+ .sp
482
+ to return something like:
483
+ .sp
484
+ .nf
485
+ .ft C
486
+ attributes:
487
+ checksum: fa0fc4abf3f6787aeb5c3c5c35de667c
488
+ name: default.rb
489
+ path: attributes/default.rb
490
+ specificity: default
491
+ url: https://somelongurlhere.com
492
+ chef_type: cookbook_version
493
+ cookbook_name: getting\-started
494
+ definitions: []
495
+ files: []
496
+ frozen?: false
497
+ json_class: Chef::CookbookVersion
498
+ libraries: []
499
+ .ft P
500
+ .fi
501
+ .sp
502
+ To only view data about "templates", enter:
503
+ .sp
504
+ .nf
505
+ .ft C
506
+ $ knife cookbook show getting\-started 0.3.0 templates
507
+ .ft P
508
+ .fi
509
+ .sp
510
+ to return something like:
511
+ .sp
512
+ .nf
513
+ .ft C
514
+ checksum: a29d6f254577b830091f140c3a78b1fe
515
+ name: chef\-getting\-started.txt.erb
516
+ path: templates/default/chef\-getting\-started.txt.erb
517
+ specificity: default
518
+ url: https://someurlhere.com
519
+ .ft P
520
+ .fi
521
+ .sp
522
+ To view information in JSON format, use the \fB\-F\fP common option as part of the command like this:
523
+ .sp
524
+ .nf
525
+ .ft C
526
+ $ knife role show devops \-F json
527
+ .ft P
528
+ .fi
529
+ .sp
530
+ Other formats available include \fBtext\fP, \fByaml\fP, and \fBpp\fP.
531
+ .SH TEST
532
+ .sp
533
+ The \fBtest\fP argument is used to test a cookbook for syntax errors. This argument uses Ruby syntax checking to verify every file in a cookbook that ends in .rb and Embedded Ruby (ERB).
534
+ .sp
535
+ \fBSyntax\fP
536
+ .sp
537
+ This argument has the following syntax:
538
+ .sp
539
+ .nf
540
+ .ft C
541
+ $ knife cookbook test COOKBOOK_NAME (options)
542
+ .ft P
543
+ .fi
544
+ .sp
545
+ \fBOptions\fP
546
+ .sp
547
+ This argument has the following options:
548
+ .INDENT 0.0
549
+ .TP
550
+ .B \fB\-a\fP, \fB\-\-all\fP
551
+ Indicates that all cookbooks will be tested.
552
+ .TP
553
+ .B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP
554
+ The directory in which cookbook are created. This can be a colon\-separated path.
555
+ .UNINDENT
556
+ .sp
557
+ \fBExamples\fP
558
+ .sp
559
+ To test a cookbook named "getting\-started", enter:
560
+ .sp
561
+ .nf
562
+ .ft C
563
+ $ knife cookbook test getting\-started
564
+ .ft P
565
+ .fi
566
+ .SH UPLOAD
567
+ .sp
568
+ The \fBupload\fP argument is used to upload one or more cookbooks (and any files that are associated with those cookbooks) from a local repository to the server. Only files that do not already exist on the server will be uploaded.
569
+ .IP Note
570
+ Use a chefignore file to prevent the upload of specific files and file types, such as temporary files or files placed in folders by version control systems. The chefignore file must be located in the root of the cookbook repository and must use rules similar to filename globbing (as defined by the Ruby \fBFile.fnmatch\fP syntax).
571
+ .RE
572
+ .sp
573
+ \fBSyntax\fP
574
+ .sp
575
+ This argument has the following syntax:
576
+ .sp
577
+ .nf
578
+ .ft C
579
+ $ knife cookbook upload [COOKBOOK_NAME...] (options)
580
+ .ft P
581
+ .fi
582
+ .sp
583
+ \fBOptions\fP
584
+ .sp
585
+ This argument has the following options:
586
+ .INDENT 0.0
587
+ .TP
588
+ .B \fB\-a\fP, \fB\-\-all\fP
589
+ Indicates that all cookbooks will be uploaded.
590
+ .TP
591
+ .B \fB\-d\fP, \fB\-\-include\-dependencies\fP
592
+ Indicates that when a cookbook has a dependency on one (or more) cookbooks, those cookbooks will also be uploaded.
593
+ .TP
594
+ .B \fB\-\-force\fP
595
+ Indicates that a cookbook should be updated even if the \fB\-\-freeze\fP flag has been set.
596
+ .TP
597
+ .B \fB\-\-freeze\fP
598
+ Indicates that a cookbook cannot be modified; any changes to this cookbook must be included as a new version. Only the \fB\-\-force\fP option can override this setting.
599
+ .TP
600
+ .B \fB\-o PATH:PATH\fP, \fB\-\-cookbook\-path PATH:PATH\fP
601
+ The directory in which cookbook are created. This can be a colon\-separated path.
602
+ .UNINDENT
603
+ .sp
604
+ \fBExamples\fP
605
+ .sp
606
+ To upload a cookbook named "getting\-started":
607
+ .sp
608
+ .nf
609
+ .ft C
610
+ $ knife cookbook upload getting\-started
611
+ .ft P
612
+ .fi
613
+ .sp
614
+ To upload a cookbook, and then prevent other users from being able to make changes to it, enter:
615
+ .sp
616
+ .nf
617
+ .ft C
618
+ $ knife cookbook upload redis \-\-freeze
619
+ .ft P
620
+ .fi
621
+ .sp
622
+ to return something like:
623
+ .sp
624
+ .nf
625
+ .ft C
626
+ Uploading redis...
627
+ Upload completed
628
+ .ft P
629
+ .fi
630
+ .sp
631
+ If a cookbook is frozen and the \fB\-\-force\fP option is not specified, Knife will return an error message similar to the following:
632
+ .sp
633
+ .nf
634
+ .ft C
635
+ Uploading redis...
636
+ ERROR: Version 0.1.6 of cookbook redis is frozen. Use \-\-force to override.
637
+ .ft P
638
+ .fi
639
+ .SH AUTHOR
640
+ Opscode
641
+ .\" Generated by docutils manpage writer.
235
642
  .
236
- .IP "" 0
237
- .
238
- .SH "METADATA"
239
- \fBknife cookbook metadata cookbook\fR \fI(options)\fR
240
- .
241
- .TP
242
- \fB\-a\fR, \fB\-\-all\fR
243
- generate metadata for all cookbooks, rather than just a single cookbook
244
- .
245
- .TP
246
- \fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
247
- a colon\-separated path to look for cookbooks in
248
- .
249
- .P
250
- generate cookbook metadata for the named \fIcookbook\fR\. the \fIpath\fR used here specifies where the cookbooks directory is located and corresponds to the \fBcookbook_path\fR configuration option\.
251
- .
252
- .SH "METADATA FROM FILE"
253
- \fBknife cookbook metadata from file\fR \fI(options)\fR
254
- .
255
- .P
256
- load the cookbook metadata from a specified file\.
257
- .
258
- .SH "TEST"
259
- \fBknife cookbook test [cookbooks\.\.\.]\fR \fI(options)\fR
260
- .
261
- .TP
262
- \fB\-a\fR, \fB\-\-all\fR
263
- test all cookbooks, rather than just a single cookbook
264
- .
265
- .TP
266
- \fB\-o\fR, \fB\-\-cookbook\-path path:path\fR
267
- a colon\-separated path to look for cookbooks in
268
- .
269
- .P
270
- test the specified cookbooks for syntax errors\. this uses the built\-in ruby syntax checking option for files in the cookbook ending in \fB\.rb\fR, and the erb syntax check for files ending in \fB\.erb\fR (templates)\.
271
- .
272
- .SH "RECIPE LIST"
273
- \fBknife recipe list [PATTERN]\fR
274
- .
275
- .P
276
- List available recipes from the server\. Specify \fIPATTERN\fR as a regular expression to limit the results\.
277
- .
278
- .SH "DESCRIPTION"
279
- Cookbooks are the fundamental unit of distribution in Chef\. They encapsulate all recipes of resources and assets used to configure a particular aspect of the infrastructure\. The following sub\-commands can be used to manipulate the cookbooks stored on the Chef Server\.
280
- .
281
- .P
282
- On disk, cookbooks are directories with a defined structure\. The following directories may appear within a cookbook:
283
- .
284
- .TP
285
- COOKBOOK/attributes/
286
- Ruby files that define default parameters to be used in recipes
287
- .
288
- .TP
289
- COOKBOOK/definitions/
290
- Ruby files that contain \fIresource definitions\fR
291
- .
292
- .TP
293
- COOKBOOK/files/SPECIFICITY
294
- Files of arbitrary type\. These files may be downloaded by chef\-client(8) when configuring a host\.
295
- .
296
- .TP
297
- COOKBOOK/libraries/
298
- Ruby files that contain library code needed for recipes
299
- .
300
- .TP
301
- COOKBOOK/providers/
302
- Ruby files that contain Lightweight Provider definitions
303
- .
304
- .TP
305
- COOKBOOK/recipes/
306
- Ruby files that use Chef\'s recipe DSL to describe the desired configuration of a system
307
- .
308
- .TP
309
- COOKBOOK/resources/
310
- Ruby files that contain Lightweight Resource definitions
311
- .
312
- .TP
313
- COOKBOOK/templates/SPECIFICITY
314
- ERuby (ERb) template files\. These are referenced by \fIrecipes\fR and evaluated to dynamically generate configuration files\.
315
- .
316
- .P
317
- \fBSPECIFICITY\fR is a feature of \fIfiles\fR and \fItemplates\fR that allow you to specify alternate files to be used on a specific OS platform or host\. The default specificity setting is \fIdefault\fR, that is files in \fBCOOKBOOK/files/default\fR will be used when a more specific copy is not available\. Further documentation for this feature is available on the Chef wiki: \fIhttp://wiki\.opscode\.com/display/chef/File+Distribution#FileDistribution\-FileSpecificity\fR
318
- .
319
- .P
320
- Cookbooks also contain a metadata file that defines various properties of the cookbook\. The most important of these are the \fIversion\fR and the \fIdependencies\fR\. The \fIversion\fR is used in combination with environments to select which copy of a given cookbook is distributed to a node\. The \fIdependencies\fR are used by the server to determine which additional cookbooks must be distributed to a given host when it requires a cookbook\.
321
- .
322
- .SH "SEE ALSO"
323
- \fBknife\-environment(1)\fR \fBknife\-cookbook\-site(1)\fR \fIhttp://wiki\.opscode\.com/display/chef/Cookbooks\fR \fIhttp://wiki\.opscode\.com/display/chef/Metadata\fR
324
- .
325
- .SH "AUTHOR"
326
- Chef was written by Adam Jacob \fIadam@opscode\.com\fR with many contributions from the community\.
327
- .
328
- .SH "DOCUMENTATION"
329
- 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\.
330
- .
331
- .SH "CHEF"
332
- Knife is distributed with Chef\. \fIhttp://wiki\.opscode\.com/display/chef/Home\fR