chef 11.10.0.rc.0 → 11.10.0.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (401) hide show
  1. data/Rakefile +0 -75
  2. data/distro/common/html/_sources/ctl_chef_client.txt +36 -0
  3. data/distro/common/html/_sources/ctl_chef_server.txt +26 -0
  4. data/distro/common/html/_sources/ctl_chef_shell.txt +15 -0
  5. data/distro/common/html/_sources/ctl_chef_solo.txt +25 -0
  6. data/distro/common/html/_sources/index.txt +126 -0
  7. data/distro/common/html/_sources/knife.txt +74 -0
  8. data/distro/common/html/_sources/knife_bootstrap.txt +56 -0
  9. data/distro/common/html/_sources/knife_client.txt +151 -0
  10. data/distro/common/html/_sources/knife_common_options.txt +6 -0
  11. data/distro/common/html/_sources/knife_configure.txt +29 -0
  12. data/distro/common/html/_sources/knife_cookbook.txt +236 -0
  13. data/distro/common/html/_sources/knife_cookbook_site.txt +157 -0
  14. data/distro/common/html/_sources/knife_data_bag.txt +160 -0
  15. data/distro/common/html/_sources/knife_delete.txt +26 -0
  16. data/distro/common/html/_sources/knife_deps.txt +61 -0
  17. data/distro/common/html/_sources/knife_diff.txt +34 -0
  18. data/distro/common/html/_sources/knife_download.txt +44 -0
  19. data/distro/common/html/_sources/knife_edit.txt +26 -0
  20. data/distro/common/html/_sources/knife_environment.txt +158 -0
  21. data/distro/common/html/_sources/knife_exec.txt +47 -0
  22. data/distro/common/html/_sources/knife_index_rebuild.txt +21 -0
  23. data/distro/common/html/_sources/knife_list.txt +33 -0
  24. data/distro/common/html/_sources/knife_node.txt +250 -0
  25. data/distro/common/html/_sources/knife_raw.txt +35 -0
  26. data/distro/common/html/_sources/knife_recipe_list.txt +23 -0
  27. data/distro/common/html/_sources/knife_role.txt +157 -0
  28. data/distro/common/html/_sources/knife_search.txt +53 -0
  29. data/distro/common/html/_sources/knife_show.txt +27 -0
  30. data/distro/common/html/_sources/knife_ssh.txt +43 -0
  31. data/distro/common/html/_sources/knife_status.txt +37 -0
  32. data/distro/common/html/_sources/knife_tag.txt +69 -0
  33. data/distro/common/html/_sources/knife_upload.txt +49 -0
  34. data/distro/common/html/_sources/knife_user.txt +127 -0
  35. data/distro/common/html/_sources/knife_using.txt +43 -0
  36. data/distro/common/html/_sources/knife_xargs.txt +30 -0
  37. data/distro/common/html/_static/ajax-loader.gif +0 -0
  38. data/distro/common/html/_static/basic.css +540 -0
  39. data/distro/common/html/_static/chef.css +507 -0
  40. data/distro/common/html/_static/chef.ico +0 -0
  41. data/distro/common/html/_static/chef_html_logo.png +0 -0
  42. data/distro/common/html/_static/chef_logo.png +0 -0
  43. data/distro/common/html/_static/comment-bright.png +0 -0
  44. data/distro/common/html/_static/comment-close.png +0 -0
  45. data/distro/common/html/_static/comment.png +0 -0
  46. data/distro/common/html/_static/contents.png +0 -0
  47. data/distro/common/html/_static/doctools.js +247 -0
  48. data/distro/common/html/_static/down-pressed.png +0 -0
  49. data/distro/common/html/_static/down.png +0 -0
  50. data/distro/common/html/_static/file.png +0 -0
  51. data/distro/common/html/_static/guide.css +505 -0
  52. data/distro/common/html/_static/jquery.js +154 -0
  53. data/distro/common/html/_static/minus.png +0 -0
  54. data/distro/common/html/_static/navigation.png +0 -0
  55. data/distro/common/html/_static/plus.png +0 -0
  56. data/distro/common/html/_static/pygments.css +62 -0
  57. data/distro/common/html/_static/searchtools.js +560 -0
  58. data/distro/common/html/_static/underscore.js +23 -0
  59. data/distro/common/html/_static/up-pressed.png +0 -0
  60. data/distro/common/html/_static/up.png +0 -0
  61. data/distro/common/html/_static/websupport.js +808 -0
  62. data/distro/common/html/ctl_chef_client.html +219 -0
  63. data/distro/common/html/ctl_chef_server.html +111 -0
  64. data/distro/common/html/ctl_chef_shell.html +120 -0
  65. data/distro/common/html/ctl_chef_solo.html +144 -0
  66. data/distro/common/html/index.html +185 -0
  67. data/distro/common/html/knife.html +172 -0
  68. data/distro/common/html/knife_bootstrap.html +250 -0
  69. data/distro/common/html/knife_client.html +283 -0
  70. data/distro/common/html/knife_common_options.html +98 -0
  71. data/distro/common/html/knife_configure.html +107 -0
  72. data/distro/common/html/knife_cookbook.html +481 -0
  73. data/distro/common/html/knife_cookbook_site.html +372 -0
  74. data/distro/common/html/knife_data_bag.html +359 -0
  75. data/distro/common/html/knife_delete.html +95 -0
  76. data/distro/common/html/knife_deps.html +145 -0
  77. data/distro/common/html/knife_diff.html +125 -0
  78. data/distro/common/html/knife_download.html +147 -0
  79. data/distro/common/html/knife_edit.html +91 -0
  80. data/distro/common/html/knife_environment.html +328 -0
  81. data/distro/common/html/knife_exec.html +222 -0
  82. data/distro/common/html/knife_index_rebuild.html +85 -0
  83. data/distro/common/html/knife_list.html +116 -0
  84. data/distro/common/html/knife_node.html +450 -0
  85. data/distro/common/html/knife_raw.html +112 -0
  86. data/distro/common/html/knife_recipe_list.html +93 -0
  87. data/distro/common/html/knife_role.html +295 -0
  88. data/distro/common/html/knife_search.html +204 -0
  89. data/distro/common/html/knife_show.html +106 -0
  90. data/distro/common/html/knife_ssh.html +179 -0
  91. data/distro/common/html/knife_status.html +142 -0
  92. data/distro/common/html/knife_tag.html +140 -0
  93. data/distro/common/html/knife_upload.html +155 -0
  94. data/distro/common/html/knife_user.html +244 -0
  95. data/distro/common/html/knife_using.html +211 -0
  96. data/distro/common/html/knife_xargs.html +115 -0
  97. data/distro/common/html/objects.inv +0 -0
  98. data/distro/common/html/search.html +84 -0
  99. data/distro/common/html/searchindex.js +1 -0
  100. data/distro/common/man/man1/chef-shell.1 +5 -5
  101. data/distro/common/man/man1/knife-bootstrap.1 +6 -9
  102. data/distro/common/man/man1/knife-client.1 +1 -9
  103. data/distro/common/man/man1/knife-configure.1 +10 -6
  104. data/distro/common/man/man1/knife-cookbook-site.1 +1 -9
  105. data/distro/common/man/man1/knife-cookbook.1 +11 -21
  106. data/distro/common/man/man1/knife-data-bag.1 +8 -22
  107. data/distro/common/man/man1/knife-delete.1 +1 -1
  108. data/distro/common/man/man1/knife-deps.1 +4 -12
  109. data/distro/common/man/man1/knife-diff.1 +1 -1
  110. data/distro/common/man/man1/knife-download.1 +2 -2
  111. data/distro/common/man/man1/knife-edit.1 +1 -1
  112. data/distro/common/man/man1/knife-environment.1 +108 -9
  113. data/distro/common/man/man1/knife-exec.1 +1 -15
  114. data/distro/common/man/man1/knife-index-rebuild.1 +1 -1
  115. data/distro/common/man/man1/knife-list.1 +1 -1
  116. data/distro/common/man/man1/knife-node.1 +3 -13
  117. data/distro/common/man/man1/knife-raw.1 +1 -1
  118. data/distro/common/man/man1/knife-recipe-list.1 +1 -1
  119. data/distro/common/man/man1/knife-role.1 +2 -12
  120. data/distro/common/man/man1/knife-search.1 +5 -5
  121. data/distro/common/man/man1/knife-show.1 +1 -3
  122. data/distro/common/man/man1/knife-ssh.1 +1 -5
  123. data/distro/common/man/man1/knife-status.1 +1 -1
  124. data/distro/common/man/man1/knife-tag.1 +1 -9
  125. data/distro/common/man/man1/knife-upload.1 +7 -9
  126. data/distro/common/man/man1/knife-user.1 +3 -17
  127. data/distro/common/man/man1/knife-xargs.1 +1 -3
  128. data/distro/common/man/man8/chef-client.8 +18 -18
  129. data/distro/common/man/man8/chef-solo.8 +12 -6
  130. data/lib/chef/client.rb +9 -5
  131. data/lib/chef/cookbook_uploader.rb +1 -1
  132. data/lib/chef/dsl/recipe.rb +119 -38
  133. data/lib/chef/exceptions.rb +4 -0
  134. data/lib/chef/policy_builder/expand_node_object.rb +11 -4
  135. data/lib/chef/policy_builder/policyfile.rb +7 -1
  136. data/lib/chef/provider/file.rb +1 -0
  137. data/lib/chef/resource_platform_map.rb +1 -1
  138. data/lib/chef/resource_reporter.rb +2 -2
  139. data/lib/chef/version.rb +1 -1
  140. data/spec/functional/knife/cookbook_delete_spec.rb +9 -9
  141. data/spec/functional/knife/ssh_spec.rb +1 -1
  142. data/spec/functional/resource/link_spec.rb +6 -6
  143. data/spec/functional/resource/registry_spec.rb +7 -7
  144. data/spec/functional/run_lock_spec.rb +1 -1
  145. data/spec/integration/knife/download_spec.rb +1 -1
  146. data/spec/integration/solo/solo_spec.rb +1 -1
  147. data/spec/spec_helper.rb +0 -1
  148. data/spec/stress/win32/file_spec.rb +6 -0
  149. data/spec/support/lib/chef/resource/zen_master.rb +1 -1
  150. data/spec/support/mock/platform.rb +1 -1
  151. data/spec/support/shared/functional/file_resource.rb +0 -2
  152. data/spec/support/shared/functional/securable_resource.rb +2 -2
  153. data/spec/support/shared/unit/api_error_inspector.rb +7 -7
  154. data/spec/support/shared/unit/provider/file.rb +47 -8
  155. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +23 -23
  156. data/spec/unit/api_client/registration_spec.rb +5 -5
  157. data/spec/unit/api_client_spec.rb +2 -2
  158. data/spec/unit/application/apply.rb +6 -6
  159. data/spec/unit/application/client_spec.rb +6 -6
  160. data/spec/unit/application/knife_spec.rb +5 -5
  161. data/spec/unit/application/solo_spec.rb +13 -13
  162. data/spec/unit/application_spec.rb +19 -19
  163. data/spec/unit/checksum/storage/filesystem_spec.rb +2 -2
  164. data/spec/unit/client_spec.rb +23 -23
  165. data/spec/unit/config_spec.rb +4 -4
  166. data/spec/unit/cookbook/metadata_spec.rb +22 -22
  167. data/spec/unit/cookbook/synchronizer_spec.rb +17 -17
  168. data/spec/unit/daemon_spec.rb +21 -22
  169. data/spec/unit/data_bag_item_spec.rb +8 -8
  170. data/spec/unit/data_bag_spec.rb +6 -6
  171. data/spec/unit/deprecation_spec.rb +1 -1
  172. data/spec/unit/dsl/data_query_spec.rb +1 -1
  173. data/spec/unit/environment_spec.rb +5 -5
  174. data/spec/unit/file_access_control_spec.rb +5 -5
  175. data/spec/unit/file_cache_spec.rb +1 -1
  176. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +1 -1
  177. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +12 -12
  178. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +4 -4
  179. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -4
  180. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +1 -1
  181. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +6 -6
  182. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +4 -4
  183. data/spec/unit/handler/json_file_spec.rb +1 -1
  184. data/spec/unit/handler_spec.rb +3 -3
  185. data/spec/unit/knife/bootstrap_spec.rb +17 -17
  186. data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
  187. data/spec/unit/knife/client_create_spec.rb +7 -7
  188. data/spec/unit/knife/client_reregister_spec.rb +2 -2
  189. data/spec/unit/knife/client_show_spec.rb +1 -1
  190. data/spec/unit/knife/config_file_selection_spec.rb +4 -4
  191. data/spec/unit/knife/configure_client_spec.rb +4 -4
  192. data/spec/unit/knife/configure_spec.rb +16 -16
  193. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +10 -10
  194. data/spec/unit/knife/cookbook_create_spec.rb +5 -5
  195. data/spec/unit/knife/cookbook_delete_spec.rb +6 -6
  196. data/spec/unit/knife/cookbook_download_spec.rb +10 -10
  197. data/spec/unit/knife/cookbook_list_spec.rb +3 -3
  198. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +2 -2
  199. data/spec/unit/knife/cookbook_metadata_spec.rb +8 -8
  200. data/spec/unit/knife/cookbook_show_spec.rb +4 -4
  201. data/spec/unit/knife/cookbook_site_download_spec.rb +3 -3
  202. data/spec/unit/knife/cookbook_site_install_spec.rb +8 -8
  203. data/spec/unit/knife/cookbook_site_share_spec.rb +22 -22
  204. data/spec/unit/knife/cookbook_site_unshare_spec.rb +8 -8
  205. data/spec/unit/knife/cookbook_test_spec.rb +7 -7
  206. data/spec/unit/knife/cookbook_upload_spec.rb +20 -20
  207. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +6 -6
  208. data/spec/unit/knife/core/object_loader_spec.rb +1 -1
  209. data/spec/unit/knife/core/ui_spec.rb +19 -21
  210. data/spec/unit/knife/data_bag_create_spec.rb +4 -4
  211. data/spec/unit/knife/data_bag_edit_spec.rb +7 -7
  212. data/spec/unit/knife/data_bag_from_file_spec.rb +15 -15
  213. data/spec/unit/knife/data_bag_show_spec.rb +5 -5
  214. data/spec/unit/knife/environment_create_spec.rb +6 -6
  215. data/spec/unit/knife/environment_delete_spec.rb +6 -6
  216. data/spec/unit/knife/environment_edit_spec.rb +5 -5
  217. data/spec/unit/knife/environment_from_file_spec.rb +7 -7
  218. data/spec/unit/knife/environment_list_spec.rb +4 -4
  219. data/spec/unit/knife/environment_show_spec.rb +4 -4
  220. data/spec/unit/knife/index_rebuild_spec.rb +2 -2
  221. data/spec/unit/knife/knife_help.rb +11 -11
  222. data/spec/unit/knife/node_bulk_delete_spec.rb +4 -4
  223. data/spec/unit/knife/node_delete_spec.rb +5 -5
  224. data/spec/unit/knife/node_edit_spec.rb +2 -2
  225. data/spec/unit/knife/node_from_file_spec.rb +5 -5
  226. data/spec/unit/knife/node_list_spec.rb +3 -3
  227. data/spec/unit/knife/node_run_list_add_spec.rb +3 -3
  228. data/spec/unit/knife/node_run_list_remove_spec.rb +4 -4
  229. data/spec/unit/knife/node_run_list_set_spec.rb +5 -5
  230. data/spec/unit/knife/node_show_spec.rb +2 -2
  231. data/spec/unit/knife/role_bulk_delete_spec.rb +4 -4
  232. data/spec/unit/knife/role_create_spec.rb +5 -5
  233. data/spec/unit/knife/role_delete_spec.rb +5 -5
  234. data/spec/unit/knife/role_edit_spec.rb +5 -5
  235. data/spec/unit/knife/role_from_file_spec.rb +5 -5
  236. data/spec/unit/knife/role_list_spec.rb +2 -2
  237. data/spec/unit/knife/ssh_spec.rb +6 -6
  238. data/spec/unit/knife/status_spec.rb +4 -4
  239. data/spec/unit/knife/tag_create_spec.rb +3 -3
  240. data/spec/unit/knife/tag_delete_spec.rb +3 -3
  241. data/spec/unit/knife/tag_list_spec.rb +2 -2
  242. data/spec/unit/knife/user_create_spec.rb +7 -7
  243. data/spec/unit/knife/user_reregister_spec.rb +3 -3
  244. data/spec/unit/knife/user_show_spec.rb +1 -1
  245. data/spec/unit/knife_spec.rb +29 -29
  246. data/spec/unit/lwrp_spec.rb +2 -2
  247. data/spec/unit/mixin/checksum_spec.rb +2 -2
  248. data/spec/unit/mixin/command_spec.rb +1 -1
  249. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +4 -4
  250. data/spec/unit/mixin/params_validate_spec.rb +17 -17
  251. data/spec/unit/mixin/path_sanity_spec.rb +8 -8
  252. data/spec/unit/mixin/securable_spec.rb +87 -87
  253. data/spec/unit/mixin/shell_out_spec.rb +1 -1
  254. data/spec/unit/mixin/template_spec.rb +2 -2
  255. data/spec/unit/node/attribute_spec.rb +3 -3
  256. data/spec/unit/node_spec.rb +12 -12
  257. data/spec/unit/platform_spec.rb +1 -1
  258. data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -0
  259. data/spec/unit/policy_builder/policyfile_spec.rb +4 -0
  260. data/spec/unit/provider/breakpoint_spec.rb +8 -8
  261. data/spec/unit/provider/cookbook_file/content_spec.rb +4 -4
  262. data/spec/unit/provider/cookbook_file_spec.rb +1 -1
  263. data/spec/unit/provider/cron/unix_spec.rb +11 -11
  264. data/spec/unit/provider/cron_spec.rb +40 -40
  265. data/spec/unit/provider/deploy/revision_spec.rb +11 -12
  266. data/spec/unit/provider/deploy/timestamped_spec.rb +3 -3
  267. data/spec/unit/provider/deploy_spec.rb +50 -50
  268. data/spec/unit/provider/directory_spec.rb +18 -18
  269. data/spec/unit/provider/env_spec.rb +15 -15
  270. data/spec/unit/provider/erl_call_spec.rb +1 -1
  271. data/spec/unit/provider/execute_spec.rb +5 -5
  272. data/spec/unit/provider/file/content_spec.rb +5 -5
  273. data/spec/unit/provider/file_spec.rb +1 -1
  274. data/spec/unit/provider/git_spec.rb +47 -47
  275. data/spec/unit/provider/group/dscl_spec.rb +16 -15
  276. data/spec/unit/provider/group/gpasswd_spec.rb +6 -5
  277. data/spec/unit/provider/group/groupadd_spec.rb +10 -10
  278. data/spec/unit/provider/group/groupmod_spec.rb +3 -3
  279. data/spec/unit/provider/group/pw_spec.rb +9 -8
  280. data/spec/unit/provider/group/usermod_spec.rb +13 -12
  281. data/spec/unit/provider/group/windows_spec.rb +9 -9
  282. data/spec/unit/provider/group_spec.rb +31 -31
  283. data/spec/unit/provider/http_request_spec.rb +3 -3
  284. data/spec/unit/provider/ifconfig/aix_spec.rb +7 -7
  285. data/spec/unit/provider/ifconfig/debian_spec.rb +3 -3
  286. data/spec/unit/provider/ifconfig/redhat_spec.rb +5 -5
  287. data/spec/unit/provider/ifconfig_spec.rb +13 -13
  288. data/spec/unit/provider/link_spec.rb +33 -33
  289. data/spec/unit/provider/mdadm_spec.rb +4 -4
  290. data/spec/unit/provider/mount/aix_spec.rb +5 -5
  291. data/spec/unit/provider/mount/mount_spec.rb +49 -50
  292. data/spec/unit/provider/mount/windows_spec.rb +18 -18
  293. data/spec/unit/provider/mount_spec.rb +12 -12
  294. data/spec/unit/provider/ohai_spec.rb +6 -6
  295. data/spec/unit/provider/package/aix_spec.rb +14 -14
  296. data/spec/unit/provider/package/apt_spec.rb +10 -10
  297. data/spec/unit/provider/package/dpkg_spec.rb +13 -13
  298. data/spec/unit/provider/package/easy_install_spec.rb +6 -6
  299. data/spec/unit/provider/package/freebsd_spec.rb +29 -29
  300. data/spec/unit/provider/package/ips_spec.rb +4 -4
  301. data/spec/unit/provider/package/macports_spec.rb +6 -6
  302. data/spec/unit/provider/package/pacman_spec.rb +17 -17
  303. data/spec/unit/provider/package/portage_spec.rb +18 -18
  304. data/spec/unit/provider/package/rpm_spec.rb +7 -7
  305. data/spec/unit/provider/package/rubygems_spec.rb +31 -31
  306. data/spec/unit/provider/package/smartos_spec.rb +4 -4
  307. data/spec/unit/provider/package/solaris_spec.rb +15 -15
  308. data/spec/unit/provider/package/yum_spec.rb +100 -100
  309. data/spec/unit/provider/package/zypper_spec.rb +10 -10
  310. data/spec/unit/provider/package_spec.rb +21 -21
  311. data/spec/unit/provider/registry_key_spec.rb +2 -2
  312. data/spec/unit/provider/remote_file/content_spec.rb +31 -31
  313. data/spec/unit/provider/remote_file/fetcher_spec.rb +8 -8
  314. data/spec/unit/provider/remote_file/ftp_spec.rb +10 -10
  315. data/spec/unit/provider/remote_file/http_spec.rb +4 -4
  316. data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
  317. data/spec/unit/provider/remote_file_spec.rb +1 -1
  318. data/spec/unit/provider/route_spec.rb +23 -23
  319. data/spec/unit/provider/script_spec.rb +5 -5
  320. data/spec/unit/provider/service/arch_service_spec.rb +41 -41
  321. data/spec/unit/provider/service/debian_service_spec.rb +23 -23
  322. data/spec/unit/provider/service/freebsd_service_spec.rb +33 -33
  323. data/spec/unit/provider/service/gentoo_service_spec.rb +16 -16
  324. data/spec/unit/provider/service/init_service_spec.rb +13 -13
  325. data/spec/unit/provider/service/insserv_service_spec.rb +4 -4
  326. data/spec/unit/provider/service/invokercd_service_spec.rb +12 -12
  327. data/spec/unit/provider/service/macosx_spec.rb +20 -20
  328. data/spec/unit/provider/service/redhat_spec.rb +15 -15
  329. data/spec/unit/provider/service/simple_service_spec.rb +9 -9
  330. data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
  331. data/spec/unit/provider/service/systemd_service_spec.rb +28 -28
  332. data/spec/unit/provider/service/upstart_service_spec.rb +41 -41
  333. data/spec/unit/provider/service/windows_spec.rb +37 -37
  334. data/spec/unit/provider/service_spec.rb +9 -9
  335. data/spec/unit/provider/subversion_spec.rb +36 -36
  336. data/spec/unit/provider/template/content_spec.rb +8 -8
  337. data/spec/unit/provider/template_spec.rb +1 -1
  338. data/spec/unit/provider/user/dscl_spec.rb +9 -9
  339. data/spec/unit/provider/user/pw_spec.rb +20 -20
  340. data/spec/unit/provider/user/solaris_spec.rb +5 -5
  341. data/spec/unit/provider/user/windows_spec.rb +8 -8
  342. data/spec/unit/provider/user_spec.rb +34 -34
  343. data/spec/unit/provider_spec.rb +3 -3
  344. data/spec/unit/recipe_spec.rb +79 -4
  345. data/spec/unit/registry_helper_spec.rb +2 -2
  346. data/spec/unit/resource/cron_spec.rb +2 -2
  347. data/spec/unit/resource/directory_spec.rb +5 -5
  348. data/spec/unit/resource/env_spec.rb +2 -2
  349. data/spec/unit/resource/erl_call_spec.rb +1 -1
  350. data/spec/unit/resource/file_spec.rb +8 -8
  351. data/spec/unit/resource/group_spec.rb +3 -3
  352. data/spec/unit/resource/link_spec.rb +8 -8
  353. data/spec/unit/resource/mdadm_spec.rb +3 -3
  354. data/spec/unit/resource/mount_spec.rb +3 -3
  355. data/spec/unit/resource/route_spec.rb +2 -2
  356. data/spec/unit/resource/user_spec.rb +2 -2
  357. data/spec/unit/resource/yum_package_spec.rb +2 -2
  358. data/spec/unit/resource_collection_spec.rb +1 -1
  359. data/spec/unit/resource_definition_spec.rb +2 -2
  360. data/spec/unit/resource_reporter_spec.rb +71 -16
  361. data/spec/unit/resource_spec.rb +3 -3
  362. data/spec/unit/rest/auth_credentials_spec.rb +2 -2
  363. data/spec/unit/rest_spec.rb +3 -40
  364. data/spec/unit/run_list/run_list_expansion_spec.rb +3 -3
  365. data/spec/unit/run_list_spec.rb +9 -9
  366. data/spec/unit/run_status_spec.rb +1 -1
  367. data/spec/unit/runner_spec.rb +8 -8
  368. data/spec/unit/scan_access_control_spec.rb +3 -3
  369. data/spec/unit/search/query_spec.rb +7 -7
  370. data/spec/unit/shell/model_wrapper_spec.rb +2 -2
  371. data/spec/unit/shell/shell_ext_spec.rb +15 -15
  372. data/spec/unit/shell/shell_session_spec.rb +9 -9
  373. data/spec/unit/shell_spec.rb +1 -2
  374. data/spec/unit/user_spec.rb +4 -4
  375. data/spec/unit/util/backup_spec.rb +1 -1
  376. data/spec/unit/util/selinux_spec.rb +7 -7
  377. metadata +106 -51
  378. data/distro/common/html/chef-client.8.html +0 -145
  379. data/distro/common/html/chef-expander.8.html +0 -164
  380. data/distro/common/html/chef-expanderctl.8.html +0 -146
  381. data/distro/common/html/chef-server-webui.8.html +0 -185
  382. data/distro/common/html/chef-server.8.html +0 -182
  383. data/distro/common/html/chef-shell.1.html +0 -286
  384. data/distro/common/html/chef-solo.8.html +0 -185
  385. data/distro/common/html/chef-solr.8.html +0 -165
  386. data/distro/common/html/knife-bootstrap.1.html +0 -241
  387. data/distro/common/html/knife-client.1.html +0 -219
  388. data/distro/common/html/knife-configure.1.html +0 -170
  389. data/distro/common/html/knife-cookbook-site.1.html +0 -241
  390. data/distro/common/html/knife-cookbook.1.html +0 -381
  391. data/distro/common/html/knife-data-bag.1.html +0 -235
  392. data/distro/common/html/knife-environment.1.html +0 -265
  393. data/distro/common/html/knife-exec.1.html +0 -134
  394. data/distro/common/html/knife-index.1.html +0 -125
  395. data/distro/common/html/knife-node.1.html +0 -250
  396. data/distro/common/html/knife-role.1.html +0 -200
  397. data/distro/common/html/knife-search.1.html +0 -288
  398. data/distro/common/html/knife-ssh.1.html +0 -156
  399. data/distro/common/html/knife-status.1.html +0 -128
  400. data/distro/common/html/knife-tag.1.html +0 -137
  401. data/distro/common/html/knife.1.html +0 -315
@@ -0,0 +1,372 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>knife cookbook site &mdash; chef-client Man Pages</title>
11
+
12
+ <link rel="stylesheet" href="_static/guide.css" type="text/css" />
13
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
+
15
+ <script type="text/javascript">
16
+ var DOCUMENTATION_OPTIONS = {
17
+ URL_ROOT: '',
18
+ VERSION: '',
19
+ COLLAPSE_INDEX: false,
20
+ FILE_SUFFIX: '.html',
21
+ HAS_SOURCE: true
22
+ };
23
+ </script>
24
+ <script type="text/javascript" src="_static/jquery.js"></script>
25
+ <script type="text/javascript" src="_static/underscore.js"></script>
26
+ <script type="text/javascript" src="_static/doctools.js"></script>
27
+ <link rel="shortcut icon" href="_static/chef.ico"/>
28
+
29
+
30
+ </head>
31
+ <body>
32
+ <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
33
+ <a href="http://docs.opscode.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
34
+ </div>
35
+
36
+
37
+
38
+
39
+ <div class="document">
40
+ <div class="documentwrapper">
41
+
42
+ <div class="body">
43
+
44
+ <div class="section" id="knife-cookbook-site">
45
+ <h1>knife cookbook site<a class="headerlink" href="#knife-cookbook-site" title="Permalink to this headline">¶</a></h1>
46
+ <p>The Cookbooks Site API is used to provide access to the cookbooks community hosted at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>. All of the cookbooks in the community are accessible through a REST API located at <a class="reference external" href="https://cookbooks.opscode.com/api/v1/">https://cookbooks.opscode.com/api/v1/</a> by using any of the supported endpoints. In most cases, using Knife and the <strong>knife cookbook site</strong> sub-command (and any of its arguments) is the recommended method of interacting with these cookbooks, but in some cases, using the REST API directly may make sense.</p>
47
+ <p>The <strong>knife cookbook site</strong> subcommand is used to interact with cookbooks that are located at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>. A user account is required for any community actions that write data to this site. The following arguments do not require a user account: <tt class="docutils literal"><span class="pre">download</span></tt>, <tt class="docutils literal"><span class="pre">search</span></tt>, <tt class="docutils literal"><span class="pre">install</span></tt>, and <tt class="docutils literal"><span class="pre">list</span></tt>.</p>
48
+ <div class="admonition note">
49
+ <p class="first admonition-title">Note</p>
50
+ <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) Knife subcommands and plugins.</p>
51
+ </div>
52
+ <div class="section" id="download">
53
+ <h2>download<a class="headerlink" href="#download" title="Permalink to this headline">¶</a></h2>
54
+ <p>The <tt class="docutils literal"><span class="pre">download</span></tt> argument is used to download a cookbook from the community website. A cookbook will be downloaded as a tar.gz archive and placed in the current working directory. If a cookbook (or cookbook version) has been deprecated and the <tt class="docutils literal"><span class="pre">--force</span></tt> option is not used, Knife will alert the user that the cookbook is deprecated and then will provide the name of the most recent non-deprecated version of that cookbook.</p>
55
+ <div class="section" id="syntax">
56
+ <h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
57
+ <p>This argument has the following syntax:</p>
58
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site download COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
59
+ </pre></div>
60
+ </div>
61
+ </div>
62
+ <div class="section" id="options">
63
+ <h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
64
+ <p>This argument has the following options:</p>
65
+ <dl class="docutils">
66
+ <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
67
+ <dd>The version of a cookbook to be downloaded. 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.</dd>
68
+ <dt><tt class="docutils literal"><span class="pre">-f</span></tt>, <tt class="docutils literal"><span class="pre">--force</span></tt></dt>
69
+ <dd>Indicates that an existing directory will be overwritten.</dd>
70
+ </dl>
71
+ </div>
72
+ <div class="section" id="examples">
73
+ <h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
74
+ <p>The following examples show how to use this Knife subcommand:</p>
75
+ <p><strong>Download a cookbook</strong></p>
76
+ <p>To download the cookbook &#8220;getting-started&#8221;, enter:</p>
77
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site download getting-started
78
+ </pre></div>
79
+ </div>
80
+ <p>to return something like:</p>
81
+ <div class="highlight-bash"><div class="highlight"><pre>Downloading getting-started from the cookbooks site at version 0.3.0 to
82
+ /Users/sdanna/opscodesupport/getting-started-0.3.0.tar.gz
83
+ Cookbook saved: /Users/sdanna/opscodesupport/getting-started-0.3.0.tar.gz
84
+ </pre></div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ <div class="section" id="install">
89
+ <h2>install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h2>
90
+ <p>The <tt class="docutils literal"><span class="pre">install</span></tt> argument is used to install a cookbook that has been downloaded from the community site to a local git repository . This action uses the git version control system in conjunction with the <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a> site to install community-contributed cookbooks to the local chef-repo. Using this argument does the following:</p>
91
+ <blockquote>
92
+ <div><ol class="arabic simple">
93
+ <li>A new &#8220;pristine copy&#8221; branch is created in git for tracking the upstream.</li>
94
+ <li>All existing versions of a cookbook are removed from the branch.</li>
95
+ <li>The cookbook is downloaded from <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a> in the tar.gz format.</li>
96
+ <li>The downloaded cookbook is untarred and its contents are committed to git and a tag is created.</li>
97
+ <li>The &#8220;pristine copy&#8221; branch is merged into the master branch.</li>
98
+ </ol>
99
+ </div></blockquote>
100
+ <p>This process allows the upstream cookbook in the master branch to be modified while letting git maintain changes as a separate patch. When an updated upstream version becomes available, those changes can be merged while maintaining any local modifications.</p>
101
+ <div class="section" id="id1">
102
+ <h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
103
+ <p>This argument has the following syntax:</p>
104
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site install COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
105
+ </pre></div>
106
+ </div>
107
+ </div>
108
+ <div class="section" id="id2">
109
+ <h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
110
+ <p>This argument has the following options:</p>
111
+ <dl class="docutils">
112
+ <dt><tt class="docutils literal"><span class="pre">-b</span></tt>, <tt class="docutils literal"><span class="pre">--use-current-branch</span></tt></dt>
113
+ <dd>Indicates that the current branch will be used.</dd>
114
+ <dt><tt class="docutils literal"><span class="pre">-B</span> <span class="pre">BRANCH</span></tt>, <tt class="docutils literal"><span class="pre">--branch</span> <span class="pre">BRANCH</span></tt></dt>
115
+ <dd>The name of the default branch. This will default to the master branch.</dd>
116
+ <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
117
+ <dd>The version of the cookbook to be installed. If a version is not specified, the most recent version of the cookbook will be installed.</dd>
118
+ <dt><tt class="docutils literal"><span class="pre">-D</span></tt>, <tt class="docutils literal"><span class="pre">--skip-dependencies</span></tt></dt>
119
+ <dd>Indicates that all cookbooks to which the installed cookbook has a dependency will not be installed.</dd>
120
+ <dt><tt class="docutils literal"><span class="pre">-o</span> <span class="pre">PATH:PATH</span></tt>, <tt class="docutils literal"><span class="pre">--cookbook-path</span> <span class="pre">PATH:PATH</span></tt></dt>
121
+ <dd>The directory in which cookbook are created. This can be a colon-separated path.</dd>
122
+ </dl>
123
+ </div>
124
+ <div class="section" id="id3">
125
+ <h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
126
+ <p>The following examples show how to use this Knife subcommand:</p>
127
+ <p><strong>Install a cookbook</strong></p>
128
+ <p>To install the cookbook &#8220;getting-started&#8221;, enter:</p>
129
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site install getting-started
130
+ </pre></div>
131
+ </div>
132
+ <p>to return something like:</p>
133
+ <div class="highlight-bash"><div class="highlight"><pre>Installing getting-started to /Users/sdanna/opscodesupport/.chef/../cookbooks
134
+ Checking out the master branch.
135
+ Creating pristine copy branch chef-vendor-getting-started
136
+ Downloading getting-started from the cookbooks site at version 0.3.0 to
137
+ /Users/sdanna/opscodesupport/.chef/../cookbooks/getting-started.tar.gz
138
+ Cookbook saved: /Users/sdanna/opscodesupport/.chef/../cookbooks/getting-started.tar.gz
139
+ Removing pre-existing version.
140
+ Uncompressing getting-started version /Users/sdanna/opscodesupport/.chef/../cookbooks.
141
+ removing downloaded tarball
142
+ 1 files updated, committing changes
143
+ Creating tag cookbook-site-imported-getting-started-0.3.0
144
+ Checking out the master branch.
145
+ Updating 4d44b5b..b4c32f2
146
+ Fast-forward
147
+ cookbooks/getting-started/README.rdoc | 4 +++
148
+ cookbooks/getting-started/attributes/default.rb | 1 +
149
+ cookbooks/getting-started/metadata.json | 29 ++++++++++++++++++++
150
+ cookbooks/getting-started/metadata.rb | 6 ++++
151
+ cookbooks/getting-started/recipes/default.rb | 23 +++++++++++++++
152
+ .../templates/default/chef-getting-started.txt.erb | 5 +++
153
+ 6 files changed, 68 insertions<span class="o">(</span>+<span class="o">)</span>, 0 deletions<span class="o">(</span>-<span class="o">)</span>
154
+ create mode 100644 cookbooks/getting-started/README.rdoc
155
+ create mode 100644 cookbooks/getting-started/attributes/default.rb
156
+ create mode 100644 cookbooks/getting-started/metadata.json
157
+ create mode 100644 cookbooks/getting-started/metadata.rb
158
+ create mode 100644 cookbooks/getting-started/recipes/default.rb
159
+ create mode 100644 cookbooks/getting-started/templates/default/chef-getting-started.txt.erb
160
+ Cookbook getting-started version 0.3.0 successfully installed
161
+ </pre></div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+ <div class="section" id="list">
166
+ <h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
167
+ <p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to view a list of cookbooks that are currently available at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>.</p>
168
+ <div class="section" id="id4">
169
+ <h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
170
+ <p>This argument has the following syntax:</p>
171
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site list
172
+ </pre></div>
173
+ </div>
174
+ </div>
175
+ <div class="section" id="id5">
176
+ <h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
177
+ <p>This argument has the following options:</p>
178
+ <dl class="docutils">
179
+ <dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt>
180
+ <dd>Indicates that the corresponding URIs will be shown.</dd>
181
+ </dl>
182
+ </div>
183
+ <div class="section" id="id6">
184
+ <h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
185
+ <p>The following examples show how to use this Knife subcommand:</p>
186
+ <p><strong>View a list of cookbooks</strong></p>
187
+ <p>To view a list of cookbooks at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a> server, enter:</p>
188
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site list
189
+ </pre></div>
190
+ </div>
191
+ <p>to return:</p>
192
+ <div class="highlight-python"><pre>1password homesick rabbitmq
193
+ 7-zip hostname rabbitmq-management
194
+ AmazonEC2Tag hosts rabbitmq_chef
195
+ R hosts-awareness rackspaceknife
196
+ accounts htop radiant
197
+ ack-grep hudson rails
198
+ activemq icinga rails_enterprise
199
+ ad id3lib redis-package
200
+ ad-likewise iftop redis2
201
+ ant iis redmine
202
+ [...truncated...]</pre>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ <div class="section" id="search">
207
+ <h2>search<a class="headerlink" href="#search" title="Permalink to this headline">¶</a></h2>
208
+ <p>The <tt class="docutils literal"><span class="pre">search</span></tt> argument is used to search for a cookbook at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>. A search query is used to return a list of cookbooks at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a> and uses the same syntax as the <strong>knife search</strong> sub-command.</p>
209
+ <div class="section" id="id7">
210
+ <h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
211
+ <p>This argument has the following syntax:</p>
212
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site search SEARCH_QUERY <span class="o">(</span>options<span class="o">)</span>
213
+ </pre></div>
214
+ </div>
215
+ </div>
216
+ <div class="section" id="id8">
217
+ <h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
218
+ <p>This command does not have any specific options.</p>
219
+ </div>
220
+ <div class="section" id="id9">
221
+ <h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
222
+ <p>The following examples show how to use this Knife subcommand:</p>
223
+ <p><strong>Search for cookbooks</strong></p>
224
+ <p>To search for all of the cookbooks that can be used with Apache, enter:</p>
225
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site search apache*
226
+ </pre></div>
227
+ </div>
228
+ <p>to return something like:</p>
229
+ <div class="highlight-bash"><div class="highlight"><pre>apache2:
230
+ cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/apache2
231
+ cookbook_description: Installs and configures apache2 using Debian symlinks with helper definitions
232
+ cookbook_maintainer: opscode
233
+ cookbook_name: apache2
234
+ instiki:
235
+ cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/instiki
236
+ cookbook_description: Installs instiki, a Ruby on Rails wiki server under passenger+Apache2.
237
+ cookbook_maintainer: jtimberman
238
+ cookbook_name: instiki
239
+ kickstart:
240
+ cookbook: http://cookbooks.opscode.com/api/v1/cookbooks/kickstart
241
+ cookbook_description: Creates apache2 vhost and serves a kickstart file.
242
+ cookbook_maintainer: opscode
243
+ cookbook_name: kickstart
244
+ <span class="o">[</span>...truncated...<span class="o">]</span>
245
+ </pre></div>
246
+ </div>
247
+ </div>
248
+ </div>
249
+ <div class="section" id="share">
250
+ <h2>share<a class="headerlink" href="#share" title="Permalink to this headline">¶</a></h2>
251
+ <p>The <tt class="docutils literal"><span class="pre">share</span></tt> argument is used to add a cookbook to <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>. This action will require a user account and a certificate for <a class="reference external" href="http://community.opscode.com">http://community.opscode.com</a>. By default, Knife will use the user name and API key that is identified in the configuration file used during the upload; otherwise these values must be specified on the command line or in an alternate configuration file. If a cookbook already exists on <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>, then only an owner or maintainer of that cookbook can make updates.</p>
252
+ <div class="section" id="id10">
253
+ <h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
254
+ <p>This argument has the following syntax:</p>
255
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site share COOKBOOK_NAME CATEGORY <span class="o">(</span>options<span class="o">)</span>
256
+ </pre></div>
257
+ </div>
258
+ </div>
259
+ <div class="section" id="id11">
260
+ <h3>Options<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
261
+ <p>This argument has the following options:</p>
262
+ <dl class="docutils">
263
+ <dt><tt class="docutils literal"><span class="pre">CATEGORY</span></tt></dt>
264
+ <dd>The cookbook category: <tt class="docutils literal"><span class="pre">Databases</span></tt>, <tt class="docutils literal"><span class="pre">Web</span> <span class="pre">Servers</span></tt>, <tt class="docutils literal"><span class="pre">Process</span> <span class="pre">Management</span></tt>, <tt class="docutils literal"><span class="pre">Monitoring</span> <span class="pre">and</span> <span class="pre">Trending</span></tt>, <tt class="docutils literal"><span class="pre">Programming</span> <span class="pre">Languages</span></tt>, <tt class="docutils literal"><span class="pre">Package</span> <span class="pre">Management</span></tt>, <tt class="docutils literal"><span class="pre">Applications</span></tt>, <tt class="docutils literal"><span class="pre">Networking</span></tt>, <tt class="docutils literal"><span class="pre">Operations</span> <span class="pre">Systems</span> <span class="pre">and</span> <span class="pre">Virtualization</span></tt>, <tt class="docutils literal"><span class="pre">Utilities</span></tt>, or <tt class="docutils literal"><span class="pre">Other</span></tt>.</dd>
265
+ <dt><tt class="docutils literal"><span class="pre">-o</span> <span class="pre">PATH:PATH</span></tt>, <tt class="docutils literal"><span class="pre">--cookbook-path</span> <span class="pre">PATH:PATH</span></tt></dt>
266
+ <dd>The directory in which cookbook are created. This can be a colon-separated path.</dd>
267
+ </dl>
268
+ </div>
269
+ <div class="section" id="id12">
270
+ <h3>Examples<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
271
+ <p>The following examples show how to use this Knife subcommand:</p>
272
+ <p><strong>Share a cookbook</strong></p>
273
+ <p>To share a cookbook named &#8220;apache2&#8221;:</p>
274
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site share <span class="s2">&quot;apache2&quot;</span> <span class="s2">&quot;Web Servers&quot;</span>
275
+ </pre></div>
276
+ </div>
277
+ </div>
278
+ </div>
279
+ <div class="section" id="show">
280
+ <h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
281
+ <p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to view information about a cookbook on <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>.</p>
282
+ <div class="section" id="id13">
283
+ <h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
284
+ <p>This argument has the following syntax:</p>
285
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site show COOKBOOK_NAME <span class="o">[</span>COOKBOOK_VERSION<span class="o">]</span>
286
+ </pre></div>
287
+ </div>
288
+ </div>
289
+ <div class="section" id="id14">
290
+ <h3>Options<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
291
+ <p>This argument has the following options:</p>
292
+ <dl class="docutils">
293
+ <dt><tt class="docutils literal"><span class="pre">COOKBOOK_VERSION</span></tt></dt>
294
+ <dd>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.</dd>
295
+ </dl>
296
+ </div>
297
+ <div class="section" id="id15">
298
+ <h3>Examples<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
299
+ <p>The following examples show how to use this Knife subcommand:</p>
300
+ <p><strong>Show cookbook data</strong></p>
301
+ <p>To show the details for a cookbook named &#8220;haproxy&#8221;:</p>
302
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site show haproxy
303
+ </pre></div>
304
+ </div>
305
+ <p>to return something like:</p>
306
+ <div class="highlight-bash"><div class="highlight"><pre>average_rating:
307
+ category: Networking
308
+ created_at: 2009-10-25T23:51:07Z
309
+ description: Installs and configures haproxy
310
+ external_url:
311
+ latest_version: http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_3
312
+ maintainer: opscode
313
+ name: haproxy
314
+ updated_at: 2011-06-30T21:53:25Z
315
+ versions:
316
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_3
317
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_2
318
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_1
319
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/1_0_0
320
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_8_1
321
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_8_0
322
+ http://cookbooks.opscode.com/api/v1/cookbooks/haproxy/versions/0_7_0
323
+ </pre></div>
324
+ </div>
325
+ <p><strong>Show cookbook data as JSON</strong></p>
326
+ <p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p>
327
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife role show devops -F json
328
+ </pre></div>
329
+ </div>
330
+ <p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p>
331
+ </div>
332
+ </div>
333
+ <div class="section" id="unshare">
334
+ <h2>unshare<a class="headerlink" href="#unshare" title="Permalink to this headline">¶</a></h2>
335
+ <p>The <tt class="docutils literal"><span class="pre">unshare</span></tt> argument is used to stop the sharing of a cookbook at <a class="reference external" href="https://cookbooks.opscode.com">https://cookbooks.opscode.com</a>. Only the maintainer of a cookbook may perform this action.</p>
336
+ <div class="section" id="id16">
337
+ <h3>Syntax<a class="headerlink" href="#id16" title="Permalink to this headline">¶</a></h3>
338
+ <p>This argument has the following syntax:</p>
339
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site unshare COOKBOOK_NAME
340
+ </pre></div>
341
+ </div>
342
+ </div>
343
+ <div class="section" id="id17">
344
+ <h3>Options<a class="headerlink" href="#id17" title="Permalink to this headline">¶</a></h3>
345
+ <p>This command does not have any specific options.</p>
346
+ </div>
347
+ <div class="section" id="id18">
348
+ <h3>Examples<a class="headerlink" href="#id18" title="Permalink to this headline">¶</a></h3>
349
+ <p>The following examples show how to use this Knife subcommand:</p>
350
+ <p><strong>Unshare a cookbook</strong></p>
351
+ <p>To unshare a cookbook named &#8220;getting-started&#8221;, enter:</p>
352
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site unshare getting-started
353
+ </pre></div>
354
+ </div>
355
+ </div>
356
+ </div>
357
+ </div>
358
+
359
+
360
+ </div>
361
+
362
+ </div>
363
+
364
+
365
+ <div class="clearer"></div>
366
+ </div>
367
+
368
+
369
+
370
+
371
+ </body>
372
+ </html>
@@ -0,0 +1,359 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
+
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml">
7
+ <head>
8
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
+
10
+ <title>knife data bag &mdash; chef-client Man Pages</title>
11
+
12
+ <link rel="stylesheet" href="_static/guide.css" type="text/css" />
13
+ <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
14
+
15
+ <script type="text/javascript">
16
+ var DOCUMENTATION_OPTIONS = {
17
+ URL_ROOT: '',
18
+ VERSION: '',
19
+ COLLAPSE_INDEX: false,
20
+ FILE_SUFFIX: '.html',
21
+ HAS_SOURCE: true
22
+ };
23
+ </script>
24
+ <script type="text/javascript" src="_static/jquery.js"></script>
25
+ <script type="text/javascript" src="_static/underscore.js"></script>
26
+ <script type="text/javascript" src="_static/doctools.js"></script>
27
+ <link rel="shortcut icon" href="_static/chef.ico"/>
28
+
29
+
30
+ </head>
31
+ <body>
32
+ <div style="background-color: #212c35; text-align: left; padding: 0px 0px 0px 0px">
33
+ <a href="http://docs.opscode.com/"><img src="_static/chef_html_logo.png" border="0" alt="Chef"/></a>
34
+ </div>
35
+
36
+
37
+
38
+
39
+ <div class="document">
40
+ <div class="documentwrapper">
41
+
42
+ <div class="body">
43
+
44
+ <div class="section" id="knife-data-bag">
45
+ <h1>knife data bag<a class="headerlink" href="#knife-data-bag" title="Permalink to this headline">¶</a></h1>
46
+ <p>A data bag is a global variable that is stored as JSON data and is accessible from a server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search. The contents of a data bag can vary, but they often include sensitive information (such as database passwords).</p>
47
+ <p>A data bag item may be encrypted using <a class="reference external" href="https://en.wikipedia.org/wiki/Symmetric-key_algorithm">shared secret encryption</a>. This allows each data bag item to store confidential information (such as a database password) or to be managed in a source control system (without plain-text data appearing in revision history). Each data bag item may be encrypted individually; if a data bag contains multiple encrypted data bag items, these data bag items are not required to share the same encryption keys.</p>
48
+ <p>The <strong>knife data bag</strong> subcommand is used to manage arbitrary stores of globally available JSON data.</p>
49
+ <div class="admonition note">
50
+ <p class="first admonition-title">Note</p>
51
+ <p class="last">Review the list of <a class="reference internal" href="knife_common_options.html"><em>common options</em></a> available to this (and all) Knife subcommands and plugins.</p>
52
+ </div>
53
+ <div class="section" id="create">
54
+ <h2>create<a class="headerlink" href="#create" title="Permalink to this headline">¶</a></h2>
55
+ <p>The <tt class="docutils literal"><span class="pre">create</span></tt> argument is used to add a data bag to the server.</p>
56
+ <div class="section" id="syntax">
57
+ <h3>Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
58
+ <p>This argument has the following syntax:</p>
59
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag create DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
60
+ </pre></div>
61
+ </div>
62
+ </div>
63
+ <div class="section" id="options">
64
+ <h3>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h3>
65
+ <p>This argument has the following options:</p>
66
+ <dl class="docutils">
67
+ <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
68
+ <dd>The name of a specific item within a data bag.</dd>
69
+ <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
70
+ <dd>The encryption key that is used for values contained within a data bag item.</dd>
71
+ <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
72
+ <dd>The path to the file that contains the encryption key.</dd>
73
+ </dl>
74
+ <div class="admonition note">
75
+ <p class="first admonition-title">Note</p>
76
+ <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
77
+ </div>
78
+ </div>
79
+ <div class="section" id="examples">
80
+ <h3>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
81
+ <p>The following examples show how to use this Knife subcommand:</p>
82
+ <p><strong>Create a data bag</strong></p>
83
+ <p>To create a data bag named &#8220;admins&#8221;, enter:</p>
84
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag create admins
85
+ </pre></div>
86
+ </div>
87
+ <p>to return:</p>
88
+ <div class="highlight-bash"><div class="highlight"><pre>Created data_bag<span class="o">[</span>admins<span class="o">]</span>
89
+ </pre></div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ <div class="section" id="delete">
94
+ <h2>delete<a class="headerlink" href="#delete" title="Permalink to this headline">¶</a></h2>
95
+ <p>The <tt class="docutils literal"><span class="pre">delete</span></tt> argument is used to delete a data bag or a data bag item from a server.</p>
96
+ <div class="section" id="id1">
97
+ <h3>Syntax<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
98
+ <p>This argument has the following syntax:</p>
99
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
100
+ </pre></div>
101
+ </div>
102
+ </div>
103
+ <div class="section" id="id2">
104
+ <h3>Options<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
105
+ <p>This argument has the following options:</p>
106
+ <dl class="docutils">
107
+ <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
108
+ <dd>The name of a specific item within a data bag.</dd>
109
+ </dl>
110
+ </div>
111
+ <div class="section" id="id3">
112
+ <h3>Examples<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
113
+ <p>The following examples show how to use this Knife subcommand:</p>
114
+ <p><strong>Delete a data bag</strong></p>
115
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete data_bag_name
116
+ </pre></div>
117
+ </div>
118
+ <p><strong>Delete a data bag item</strong></p>
119
+ <p>To delete an item named &#8220;charlie&#8221;, enter:</p>
120
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag delete admins charlie
121
+ </pre></div>
122
+ </div>
123
+ <p>Type <tt class="docutils literal"><span class="pre">Y</span></tt> to confirm a deletion.</p>
124
+ </div>
125
+ </div>
126
+ <div class="section" id="edit">
127
+ <h2>edit<a class="headerlink" href="#edit" title="Permalink to this headline">¶</a></h2>
128
+ <p>The <tt class="docutils literal"><span class="pre">edit</span></tt> argument is used to edit the data contained in a data bag. If encryption is being used, the data bag will be decrypted, the data will be made available in the $EDITOR, and then encrypted again before saving it to the server.</p>
129
+ <div class="section" id="id4">
130
+ <h3>Syntax<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
131
+ <p>This argument has the following syntax:</p>
132
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit DATA_BAG_NAME <span class="o">[</span>DATA_BAG_ITEM<span class="o">]</span> <span class="o">(</span>options<span class="o">)</span>
133
+ </pre></div>
134
+ </div>
135
+ </div>
136
+ <div class="section" id="id5">
137
+ <h3>Options<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h3>
138
+ <p>This argument has the following options:</p>
139
+ <dl class="docutils">
140
+ <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
141
+ <dd>The name of a specific item within a data bag.</dd>
142
+ <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
143
+ <dd>The encryption key that is used for values contained within a data bag item.</dd>
144
+ <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
145
+ <dd>The path to the file that contains the encryption key.</dd>
146
+ </dl>
147
+ <div class="admonition note">
148
+ <p class="first admonition-title">Note</p>
149
+ <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
150
+ </div>
151
+ </div>
152
+ <div class="section" id="id6">
153
+ <h3>Examples<a class="headerlink" href="#id6" title="Permalink to this headline">¶</a></h3>
154
+ <p>The following examples show how to use this Knife subcommand:</p>
155
+ <p><strong>Edit a data bag</strong></p>
156
+ <p>To edit the contents of a data bag, enter:</p>
157
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit admins
158
+ </pre></div>
159
+ </div>
160
+ <p><strong>Edit a data bag item</strong></p>
161
+ <p>To edit an item named &#8220;charlie&#8221; that is contained in a data bag named &#8220;admins&#8221;, enter:</p>
162
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag edit admins charlie
163
+ </pre></div>
164
+ </div>
165
+ <p>to open the $EDITOR. Once opened, you can update the data before saving it to the server. For example, by changing:</p>
166
+ <div class="highlight-bash"><div class="highlight"><pre><span class="o">{</span>
167
+ <span class="s2">&quot;id&quot;</span>: <span class="s2">&quot;charlie&quot;</span>
168
+ <span class="o">}</span>
169
+ </pre></div>
170
+ </div>
171
+ <p>to:</p>
172
+ <div class="highlight-javascript"><div class="highlight"><pre><span class="p">{</span>
173
+ <span class="s2">&quot;id&quot;</span><span class="o">:</span> <span class="s2">&quot;charlie&quot;</span><span class="p">,</span>
174
+ <span class="s2">&quot;uid&quot;</span><span class="o">:</span> <span class="mi">1005</span><span class="p">,</span>
175
+ <span class="s2">&quot;gid&quot;</span><span class="o">:</span><span class="s2">&quot;ops&quot;</span><span class="p">,</span>
176
+ <span class="s2">&quot;shell&quot;</span><span class="o">:</span><span class="s2">&quot;/bin/zsh&quot;</span><span class="p">,</span>
177
+ <span class="s2">&quot;comment&quot;</span><span class="o">:</span><span class="s2">&quot;Crazy Charlie&quot;</span>
178
+ <span class="p">}</span>
179
+ </pre></div>
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <div class="section" id="from-file">
184
+ <h2>from file<a class="headerlink" href="#from-file" title="Permalink to this headline">¶</a></h2>
185
+ <p>The <tt class="docutils literal"><span class="pre">from</span> <span class="pre">file</span></tt> argument is used to create a data bag on the server from a file. The path to the data bag file must specify one of the following:</p>
186
+ <ul class="simple">
187
+ <li>the name of a data bag</li>
188
+ <li>a relative or absolute path to a file</li>
189
+ </ul>
190
+ <p>If the name of a data bag is specified, Knife will search for the data bag in <tt class="docutils literal"><span class="pre">./data_bags/bag_name/file</span></tt>. Once opened, the JSON file should be a hash that contains at least an ID key which represents the name of the data bag item.</p>
191
+ <div class="admonition warning">
192
+ <p class="first admonition-title">Warning</p>
193
+ <p class="last">A chef-client must be version 11.6 (or higher) when using the <tt class="docutils literal"><span class="pre">knife</span> <span class="pre">data</span> <span class="pre">bag</span> <span class="pre">from</span> <span class="pre">file</span></tt> argument with the Enterprise Chef or Open Source Chef version 11 servers.</p>
194
+ </div>
195
+ <div class="section" id="id7">
196
+ <h3>Syntax<a class="headerlink" href="#id7" title="Permalink to this headline">¶</a></h3>
197
+ <p>This argument has the following syntax:</p>
198
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file DATA_BAG_NAME_or_PATH
199
+ </pre></div>
200
+ </div>
201
+ </div>
202
+ <div class="section" id="id8">
203
+ <h3>Options<a class="headerlink" href="#id8" title="Permalink to this headline">¶</a></h3>
204
+ <p>This argument has the following options:</p>
205
+ <dl class="docutils">
206
+ <dt><tt class="docutils literal"><span class="pre">-a</span></tt>, <tt class="docutils literal"><span class="pre">--all</span></tt></dt>
207
+ <dd>Indicates that all data bags found at the specified path will be uploaded.</dd>
208
+ <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
209
+ <dd>The encryption key that is used for values contained within a data bag item.</dd>
210
+ <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
211
+ <dd>The path to the file that contains the encryption key.</dd>
212
+ </dl>
213
+ <div class="admonition note">
214
+ <p class="first admonition-title">Note</p>
215
+ <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
216
+ </div>
217
+ </div>
218
+ <div class="section" id="id9">
219
+ <h3>Examples<a class="headerlink" href="#id9" title="Permalink to this headline">¶</a></h3>
220
+ <p>The following examples show how to use this Knife subcommand:</p>
221
+ <p><strong>Create a data bag from a file</strong></p>
222
+ <p>To create a data bag on the server from a file:</p>
223
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file <span class="s2">&quot;path to JSON file&quot;</span>
224
+ </pre></div>
225
+ </div>
226
+ <p><strong>Create an encrypted data bag from a file</strong></p>
227
+ <p>To create a data bag named &#8220;devops_data&#8221; that contains encrypted data, enter:</p>
228
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag from file devops_data --secret-file <span class="s2">&quot;path to decryption file&quot;</span>
229
+ </pre></div>
230
+ </div>
231
+ </div>
232
+ </div>
233
+ <div class="section" id="list">
234
+ <h2>list<a class="headerlink" href="#list" title="Permalink to this headline">¶</a></h2>
235
+ <p>The <tt class="docutils literal"><span class="pre">list</span></tt> argument is used to view a list of data bags that are currently available on the server.</p>
236
+ <div class="section" id="id10">
237
+ <h3>Syntax<a class="headerlink" href="#id10" title="Permalink to this headline">¶</a></h3>
238
+ <p>This argument has the following syntax:</p>
239
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag list
240
+ </pre></div>
241
+ </div>
242
+ </div>
243
+ <div class="section" id="id11">
244
+ <h3>Options<a class="headerlink" href="#id11" title="Permalink to this headline">¶</a></h3>
245
+ <p>This argument has the following options:</p>
246
+ <dl class="docutils">
247
+ <dt><tt class="docutils literal"><span class="pre">-w</span></tt>, <tt class="docutils literal"><span class="pre">--with-uri</span></tt></dt>
248
+ <dd>Indicates that the corresponding URIs will be shown.</dd>
249
+ </dl>
250
+ </div>
251
+ <div class="section" id="id12">
252
+ <h3>Examples<a class="headerlink" href="#id12" title="Permalink to this headline">¶</a></h3>
253
+ <p>The following examples show how to use this Knife subcommand:</p>
254
+ <p><strong>View a list of data bags</strong></p>
255
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag list
256
+ </pre></div>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ <div class="section" id="show">
261
+ <h2>show<a class="headerlink" href="#show" title="Permalink to this headline">¶</a></h2>
262
+ <p>The <tt class="docutils literal"><span class="pre">show</span></tt> argument is used to view the contents of a data bag.</p>
263
+ <div class="section" id="id13">
264
+ <h3>Syntax<a class="headerlink" href="#id13" title="Permalink to this headline">¶</a></h3>
265
+ <p>This argument has the following syntax:</p>
266
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show DATA_BAG_NAME <span class="o">(</span>options<span class="o">)</span>
267
+ </pre></div>
268
+ </div>
269
+ </div>
270
+ <div class="section" id="id14">
271
+ <h3>Options<a class="headerlink" href="#id14" title="Permalink to this headline">¶</a></h3>
272
+ <p>This argument has the following options:</p>
273
+ <dl class="docutils">
274
+ <dt><tt class="docutils literal"><span class="pre">DATA_BAG_ITEM</span></tt></dt>
275
+ <dd>The name of a specific item within a data bag.</dd>
276
+ <dt><tt class="docutils literal"><span class="pre">--secret</span> <span class="pre">SECRET</span></tt></dt>
277
+ <dd>The encryption key that is used for values contained within a data bag item.</dd>
278
+ <dt><tt class="docutils literal"><span class="pre">--secret-file</span> <span class="pre">FILE</span></tt></dt>
279
+ <dd>The path to the file that contains the encryption key.</dd>
280
+ </dl>
281
+ <div class="admonition note">
282
+ <p class="first admonition-title">Note</p>
283
+ <p class="last">For encrypted data bag items, use <em>either</em> <tt class="docutils literal"><span class="pre">--secret</span></tt> or <tt class="docutils literal"><span class="pre">--secret-file</span></tt>, not both.</p>
284
+ </div>
285
+ </div>
286
+ <div class="section" id="id15">
287
+ <h3>Examples<a class="headerlink" href="#id15" title="Permalink to this headline">¶</a></h3>
288
+ <p>The following examples show how to use this Knife subcommand:</p>
289
+ <p><strong>Show a data bag</strong></p>
290
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins
291
+ </pre></div>
292
+ </div>
293
+ <p>to return something like:</p>
294
+ <div class="highlight-bash"><div class="highlight"><pre>charlie
295
+ </pre></div>
296
+ </div>
297
+ <p><strong>Show a data bag item</strong></p>
298
+ <p>To show the contents of a specific item within data bag, enter:</p>
299
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins charlie
300
+ </pre></div>
301
+ </div>
302
+ <p>to return:</p>
303
+ <div class="highlight-bash"><div class="highlight"><pre>comment: Crazy Charlie
304
+ gid: ops
305
+ id: charlie
306
+ shell: /bin/zsh
307
+ uid: 1005
308
+ </pre></div>
309
+ </div>
310
+ <p><strong>Show a data bag, encrypted</strong></p>
311
+ <p>To show the contents of a data bag named &#8220;passwords&#8221; with an item that contains encrypted data named &#8220;mysql&#8221;, enter:</p>
312
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show passwords mysql
313
+ </pre></div>
314
+ </div>
315
+ <p>to return:</p>
316
+ <div class="highlight-javascript"><pre>## sample:
317
+ {
318
+ "id": "mysql",
319
+ "pass": "trywgFA6R70NO28PNhMpGhEvKBZuxouemnbnAUQsUyo=\n",
320
+ "user": "e/p+8WJYVHY9fHcEgAAReg==\n"
321
+ }</pre>
322
+ </div>
323
+ <p><strong>Show a data bag, decrypted</strong></p>
324
+ <p>To show the decrypted contents of the same data bag, enter:</p>
325
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show --secret-file /path/to/decryption/file passwords mysql
326
+ </pre></div>
327
+ </div>
328
+ <p>to return:</p>
329
+ <div class="highlight-javascript"><pre>## sample:
330
+ {
331
+ "id": "mysql",
332
+ "pass": "thesecret123",
333
+ "user": "fred"
334
+ }</pre>
335
+ </div>
336
+ <p><strong>Show a data bag as JSON</strong></p>
337
+ <p>To view information in JSON format, use the <tt class="docutils literal"><span class="pre">-F</span></tt> common option as part of the command like this:</p>
338
+ <div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife data bag show admins -F json
339
+ </pre></div>
340
+ </div>
341
+ <p>Other formats available include <tt class="docutils literal"><span class="pre">text</span></tt>, <tt class="docutils literal"><span class="pre">yaml</span></tt>, and <tt class="docutils literal"><span class="pre">pp</span></tt>.</p>
342
+ </div>
343
+ </div>
344
+ </div>
345
+
346
+
347
+ </div>
348
+
349
+ </div>
350
+
351
+
352
+ <div class="clearer"></div>
353
+ </div>
354
+
355
+
356
+
357
+
358
+ </body>
359
+ </html>