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.
- data/Rakefile +0 -75
- data/distro/common/html/_sources/ctl_chef_client.txt +36 -0
- data/distro/common/html/_sources/ctl_chef_server.txt +26 -0
- data/distro/common/html/_sources/ctl_chef_shell.txt +15 -0
- data/distro/common/html/_sources/ctl_chef_solo.txt +25 -0
- data/distro/common/html/_sources/index.txt +126 -0
- data/distro/common/html/_sources/knife.txt +74 -0
- data/distro/common/html/_sources/knife_bootstrap.txt +56 -0
- data/distro/common/html/_sources/knife_client.txt +151 -0
- data/distro/common/html/_sources/knife_common_options.txt +6 -0
- data/distro/common/html/_sources/knife_configure.txt +29 -0
- data/distro/common/html/_sources/knife_cookbook.txt +236 -0
- data/distro/common/html/_sources/knife_cookbook_site.txt +157 -0
- data/distro/common/html/_sources/knife_data_bag.txt +160 -0
- data/distro/common/html/_sources/knife_delete.txt +26 -0
- data/distro/common/html/_sources/knife_deps.txt +61 -0
- data/distro/common/html/_sources/knife_diff.txt +34 -0
- data/distro/common/html/_sources/knife_download.txt +44 -0
- data/distro/common/html/_sources/knife_edit.txt +26 -0
- data/distro/common/html/_sources/knife_environment.txt +158 -0
- data/distro/common/html/_sources/knife_exec.txt +47 -0
- data/distro/common/html/_sources/knife_index_rebuild.txt +21 -0
- data/distro/common/html/_sources/knife_list.txt +33 -0
- data/distro/common/html/_sources/knife_node.txt +250 -0
- data/distro/common/html/_sources/knife_raw.txt +35 -0
- data/distro/common/html/_sources/knife_recipe_list.txt +23 -0
- data/distro/common/html/_sources/knife_role.txt +157 -0
- data/distro/common/html/_sources/knife_search.txt +53 -0
- data/distro/common/html/_sources/knife_show.txt +27 -0
- data/distro/common/html/_sources/knife_ssh.txt +43 -0
- data/distro/common/html/_sources/knife_status.txt +37 -0
- data/distro/common/html/_sources/knife_tag.txt +69 -0
- data/distro/common/html/_sources/knife_upload.txt +49 -0
- data/distro/common/html/_sources/knife_user.txt +127 -0
- data/distro/common/html/_sources/knife_using.txt +43 -0
- data/distro/common/html/_sources/knife_xargs.txt +30 -0
- data/distro/common/html/_static/ajax-loader.gif +0 -0
- data/distro/common/html/_static/basic.css +540 -0
- data/distro/common/html/_static/chef.css +507 -0
- data/distro/common/html/_static/chef.ico +0 -0
- data/distro/common/html/_static/chef_html_logo.png +0 -0
- data/distro/common/html/_static/chef_logo.png +0 -0
- data/distro/common/html/_static/comment-bright.png +0 -0
- data/distro/common/html/_static/comment-close.png +0 -0
- data/distro/common/html/_static/comment.png +0 -0
- data/distro/common/html/_static/contents.png +0 -0
- data/distro/common/html/_static/doctools.js +247 -0
- data/distro/common/html/_static/down-pressed.png +0 -0
- data/distro/common/html/_static/down.png +0 -0
- data/distro/common/html/_static/file.png +0 -0
- data/distro/common/html/_static/guide.css +505 -0
- data/distro/common/html/_static/jquery.js +154 -0
- data/distro/common/html/_static/minus.png +0 -0
- data/distro/common/html/_static/navigation.png +0 -0
- data/distro/common/html/_static/plus.png +0 -0
- data/distro/common/html/_static/pygments.css +62 -0
- data/distro/common/html/_static/searchtools.js +560 -0
- data/distro/common/html/_static/underscore.js +23 -0
- data/distro/common/html/_static/up-pressed.png +0 -0
- data/distro/common/html/_static/up.png +0 -0
- data/distro/common/html/_static/websupport.js +808 -0
- data/distro/common/html/ctl_chef_client.html +219 -0
- data/distro/common/html/ctl_chef_server.html +111 -0
- data/distro/common/html/ctl_chef_shell.html +120 -0
- data/distro/common/html/ctl_chef_solo.html +144 -0
- data/distro/common/html/index.html +185 -0
- data/distro/common/html/knife.html +172 -0
- data/distro/common/html/knife_bootstrap.html +250 -0
- data/distro/common/html/knife_client.html +283 -0
- data/distro/common/html/knife_common_options.html +98 -0
- data/distro/common/html/knife_configure.html +107 -0
- data/distro/common/html/knife_cookbook.html +481 -0
- data/distro/common/html/knife_cookbook_site.html +372 -0
- data/distro/common/html/knife_data_bag.html +359 -0
- data/distro/common/html/knife_delete.html +95 -0
- data/distro/common/html/knife_deps.html +145 -0
- data/distro/common/html/knife_diff.html +125 -0
- data/distro/common/html/knife_download.html +147 -0
- data/distro/common/html/knife_edit.html +91 -0
- data/distro/common/html/knife_environment.html +328 -0
- data/distro/common/html/knife_exec.html +222 -0
- data/distro/common/html/knife_index_rebuild.html +85 -0
- data/distro/common/html/knife_list.html +116 -0
- data/distro/common/html/knife_node.html +450 -0
- data/distro/common/html/knife_raw.html +112 -0
- data/distro/common/html/knife_recipe_list.html +93 -0
- data/distro/common/html/knife_role.html +295 -0
- data/distro/common/html/knife_search.html +204 -0
- data/distro/common/html/knife_show.html +106 -0
- data/distro/common/html/knife_ssh.html +179 -0
- data/distro/common/html/knife_status.html +142 -0
- data/distro/common/html/knife_tag.html +140 -0
- data/distro/common/html/knife_upload.html +155 -0
- data/distro/common/html/knife_user.html +244 -0
- data/distro/common/html/knife_using.html +211 -0
- data/distro/common/html/knife_xargs.html +115 -0
- data/distro/common/html/objects.inv +0 -0
- data/distro/common/html/search.html +84 -0
- data/distro/common/html/searchindex.js +1 -0
- data/distro/common/man/man1/chef-shell.1 +5 -5
- data/distro/common/man/man1/knife-bootstrap.1 +6 -9
- data/distro/common/man/man1/knife-client.1 +1 -9
- data/distro/common/man/man1/knife-configure.1 +10 -6
- data/distro/common/man/man1/knife-cookbook-site.1 +1 -9
- data/distro/common/man/man1/knife-cookbook.1 +11 -21
- data/distro/common/man/man1/knife-data-bag.1 +8 -22
- data/distro/common/man/man1/knife-delete.1 +1 -1
- data/distro/common/man/man1/knife-deps.1 +4 -12
- data/distro/common/man/man1/knife-diff.1 +1 -1
- data/distro/common/man/man1/knife-download.1 +2 -2
- data/distro/common/man/man1/knife-edit.1 +1 -1
- data/distro/common/man/man1/knife-environment.1 +108 -9
- data/distro/common/man/man1/knife-exec.1 +1 -15
- data/distro/common/man/man1/knife-index-rebuild.1 +1 -1
- data/distro/common/man/man1/knife-list.1 +1 -1
- data/distro/common/man/man1/knife-node.1 +3 -13
- data/distro/common/man/man1/knife-raw.1 +1 -1
- data/distro/common/man/man1/knife-recipe-list.1 +1 -1
- data/distro/common/man/man1/knife-role.1 +2 -12
- data/distro/common/man/man1/knife-search.1 +5 -5
- data/distro/common/man/man1/knife-show.1 +1 -3
- data/distro/common/man/man1/knife-ssh.1 +1 -5
- data/distro/common/man/man1/knife-status.1 +1 -1
- data/distro/common/man/man1/knife-tag.1 +1 -9
- data/distro/common/man/man1/knife-upload.1 +7 -9
- data/distro/common/man/man1/knife-user.1 +3 -17
- data/distro/common/man/man1/knife-xargs.1 +1 -3
- data/distro/common/man/man8/chef-client.8 +18 -18
- data/distro/common/man/man8/chef-solo.8 +12 -6
- data/lib/chef/client.rb +9 -5
- data/lib/chef/cookbook_uploader.rb +1 -1
- data/lib/chef/dsl/recipe.rb +119 -38
- data/lib/chef/exceptions.rb +4 -0
- data/lib/chef/policy_builder/expand_node_object.rb +11 -4
- data/lib/chef/policy_builder/policyfile.rb +7 -1
- data/lib/chef/provider/file.rb +1 -0
- data/lib/chef/resource_platform_map.rb +1 -1
- data/lib/chef/resource_reporter.rb +2 -2
- data/lib/chef/version.rb +1 -1
- data/spec/functional/knife/cookbook_delete_spec.rb +9 -9
- data/spec/functional/knife/ssh_spec.rb +1 -1
- data/spec/functional/resource/link_spec.rb +6 -6
- data/spec/functional/resource/registry_spec.rb +7 -7
- data/spec/functional/run_lock_spec.rb +1 -1
- data/spec/integration/knife/download_spec.rb +1 -1
- data/spec/integration/solo/solo_spec.rb +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/stress/win32/file_spec.rb +6 -0
- data/spec/support/lib/chef/resource/zen_master.rb +1 -1
- data/spec/support/mock/platform.rb +1 -1
- data/spec/support/shared/functional/file_resource.rb +0 -2
- data/spec/support/shared/functional/securable_resource.rb +2 -2
- data/spec/support/shared/unit/api_error_inspector.rb +7 -7
- data/spec/support/shared/unit/provider/file.rb +47 -8
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +23 -23
- data/spec/unit/api_client/registration_spec.rb +5 -5
- data/spec/unit/api_client_spec.rb +2 -2
- data/spec/unit/application/apply.rb +6 -6
- data/spec/unit/application/client_spec.rb +6 -6
- data/spec/unit/application/knife_spec.rb +5 -5
- data/spec/unit/application/solo_spec.rb +13 -13
- data/spec/unit/application_spec.rb +19 -19
- data/spec/unit/checksum/storage/filesystem_spec.rb +2 -2
- data/spec/unit/client_spec.rb +23 -23
- data/spec/unit/config_spec.rb +4 -4
- data/spec/unit/cookbook/metadata_spec.rb +22 -22
- data/spec/unit/cookbook/synchronizer_spec.rb +17 -17
- data/spec/unit/daemon_spec.rb +21 -22
- data/spec/unit/data_bag_item_spec.rb +8 -8
- data/spec/unit/data_bag_spec.rb +6 -6
- data/spec/unit/deprecation_spec.rb +1 -1
- data/spec/unit/dsl/data_query_spec.rb +1 -1
- data/spec/unit/environment_spec.rb +5 -5
- data/spec/unit/file_access_control_spec.rb +5 -5
- data/spec/unit/file_cache_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +12 -12
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +4 -4
- data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -4
- data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +6 -6
- data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +4 -4
- data/spec/unit/handler/json_file_spec.rb +1 -1
- data/spec/unit/handler_spec.rb +3 -3
- data/spec/unit/knife/bootstrap_spec.rb +17 -17
- data/spec/unit/knife/client_bulk_delete_spec.rb +4 -4
- data/spec/unit/knife/client_create_spec.rb +7 -7
- data/spec/unit/knife/client_reregister_spec.rb +2 -2
- data/spec/unit/knife/client_show_spec.rb +1 -1
- data/spec/unit/knife/config_file_selection_spec.rb +4 -4
- data/spec/unit/knife/configure_client_spec.rb +4 -4
- data/spec/unit/knife/configure_spec.rb +16 -16
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +10 -10
- data/spec/unit/knife/cookbook_create_spec.rb +5 -5
- data/spec/unit/knife/cookbook_delete_spec.rb +6 -6
- data/spec/unit/knife/cookbook_download_spec.rb +10 -10
- data/spec/unit/knife/cookbook_list_spec.rb +3 -3
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +2 -2
- data/spec/unit/knife/cookbook_metadata_spec.rb +8 -8
- data/spec/unit/knife/cookbook_show_spec.rb +4 -4
- data/spec/unit/knife/cookbook_site_download_spec.rb +3 -3
- data/spec/unit/knife/cookbook_site_install_spec.rb +8 -8
- data/spec/unit/knife/cookbook_site_share_spec.rb +22 -22
- data/spec/unit/knife/cookbook_site_unshare_spec.rb +8 -8
- data/spec/unit/knife/cookbook_test_spec.rb +7 -7
- data/spec/unit/knife/cookbook_upload_spec.rb +20 -20
- data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +6 -6
- data/spec/unit/knife/core/object_loader_spec.rb +1 -1
- data/spec/unit/knife/core/ui_spec.rb +19 -21
- data/spec/unit/knife/data_bag_create_spec.rb +4 -4
- data/spec/unit/knife/data_bag_edit_spec.rb +7 -7
- data/spec/unit/knife/data_bag_from_file_spec.rb +15 -15
- data/spec/unit/knife/data_bag_show_spec.rb +5 -5
- data/spec/unit/knife/environment_create_spec.rb +6 -6
- data/spec/unit/knife/environment_delete_spec.rb +6 -6
- data/spec/unit/knife/environment_edit_spec.rb +5 -5
- data/spec/unit/knife/environment_from_file_spec.rb +7 -7
- data/spec/unit/knife/environment_list_spec.rb +4 -4
- data/spec/unit/knife/environment_show_spec.rb +4 -4
- data/spec/unit/knife/index_rebuild_spec.rb +2 -2
- data/spec/unit/knife/knife_help.rb +11 -11
- data/spec/unit/knife/node_bulk_delete_spec.rb +4 -4
- data/spec/unit/knife/node_delete_spec.rb +5 -5
- data/spec/unit/knife/node_edit_spec.rb +2 -2
- data/spec/unit/knife/node_from_file_spec.rb +5 -5
- data/spec/unit/knife/node_list_spec.rb +3 -3
- data/spec/unit/knife/node_run_list_add_spec.rb +3 -3
- data/spec/unit/knife/node_run_list_remove_spec.rb +4 -4
- data/spec/unit/knife/node_run_list_set_spec.rb +5 -5
- data/spec/unit/knife/node_show_spec.rb +2 -2
- data/spec/unit/knife/role_bulk_delete_spec.rb +4 -4
- data/spec/unit/knife/role_create_spec.rb +5 -5
- data/spec/unit/knife/role_delete_spec.rb +5 -5
- data/spec/unit/knife/role_edit_spec.rb +5 -5
- data/spec/unit/knife/role_from_file_spec.rb +5 -5
- data/spec/unit/knife/role_list_spec.rb +2 -2
- data/spec/unit/knife/ssh_spec.rb +6 -6
- data/spec/unit/knife/status_spec.rb +4 -4
- data/spec/unit/knife/tag_create_spec.rb +3 -3
- data/spec/unit/knife/tag_delete_spec.rb +3 -3
- data/spec/unit/knife/tag_list_spec.rb +2 -2
- data/spec/unit/knife/user_create_spec.rb +7 -7
- data/spec/unit/knife/user_reregister_spec.rb +3 -3
- data/spec/unit/knife/user_show_spec.rb +1 -1
- data/spec/unit/knife_spec.rb +29 -29
- data/spec/unit/lwrp_spec.rb +2 -2
- data/spec/unit/mixin/checksum_spec.rb +2 -2
- data/spec/unit/mixin/command_spec.rb +1 -1
- data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +4 -4
- data/spec/unit/mixin/params_validate_spec.rb +17 -17
- data/spec/unit/mixin/path_sanity_spec.rb +8 -8
- data/spec/unit/mixin/securable_spec.rb +87 -87
- data/spec/unit/mixin/shell_out_spec.rb +1 -1
- data/spec/unit/mixin/template_spec.rb +2 -2
- data/spec/unit/node/attribute_spec.rb +3 -3
- data/spec/unit/node_spec.rb +12 -12
- data/spec/unit/platform_spec.rb +1 -1
- data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -0
- data/spec/unit/policy_builder/policyfile_spec.rb +4 -0
- data/spec/unit/provider/breakpoint_spec.rb +8 -8
- data/spec/unit/provider/cookbook_file/content_spec.rb +4 -4
- data/spec/unit/provider/cookbook_file_spec.rb +1 -1
- data/spec/unit/provider/cron/unix_spec.rb +11 -11
- data/spec/unit/provider/cron_spec.rb +40 -40
- data/spec/unit/provider/deploy/revision_spec.rb +11 -12
- data/spec/unit/provider/deploy/timestamped_spec.rb +3 -3
- data/spec/unit/provider/deploy_spec.rb +50 -50
- data/spec/unit/provider/directory_spec.rb +18 -18
- data/spec/unit/provider/env_spec.rb +15 -15
- data/spec/unit/provider/erl_call_spec.rb +1 -1
- data/spec/unit/provider/execute_spec.rb +5 -5
- data/spec/unit/provider/file/content_spec.rb +5 -5
- data/spec/unit/provider/file_spec.rb +1 -1
- data/spec/unit/provider/git_spec.rb +47 -47
- data/spec/unit/provider/group/dscl_spec.rb +16 -15
- data/spec/unit/provider/group/gpasswd_spec.rb +6 -5
- data/spec/unit/provider/group/groupadd_spec.rb +10 -10
- data/spec/unit/provider/group/groupmod_spec.rb +3 -3
- data/spec/unit/provider/group/pw_spec.rb +9 -8
- data/spec/unit/provider/group/usermod_spec.rb +13 -12
- data/spec/unit/provider/group/windows_spec.rb +9 -9
- data/spec/unit/provider/group_spec.rb +31 -31
- data/spec/unit/provider/http_request_spec.rb +3 -3
- data/spec/unit/provider/ifconfig/aix_spec.rb +7 -7
- data/spec/unit/provider/ifconfig/debian_spec.rb +3 -3
- data/spec/unit/provider/ifconfig/redhat_spec.rb +5 -5
- data/spec/unit/provider/ifconfig_spec.rb +13 -13
- data/spec/unit/provider/link_spec.rb +33 -33
- data/spec/unit/provider/mdadm_spec.rb +4 -4
- data/spec/unit/provider/mount/aix_spec.rb +5 -5
- data/spec/unit/provider/mount/mount_spec.rb +49 -50
- data/spec/unit/provider/mount/windows_spec.rb +18 -18
- data/spec/unit/provider/mount_spec.rb +12 -12
- data/spec/unit/provider/ohai_spec.rb +6 -6
- data/spec/unit/provider/package/aix_spec.rb +14 -14
- data/spec/unit/provider/package/apt_spec.rb +10 -10
- data/spec/unit/provider/package/dpkg_spec.rb +13 -13
- data/spec/unit/provider/package/easy_install_spec.rb +6 -6
- data/spec/unit/provider/package/freebsd_spec.rb +29 -29
- data/spec/unit/provider/package/ips_spec.rb +4 -4
- data/spec/unit/provider/package/macports_spec.rb +6 -6
- data/spec/unit/provider/package/pacman_spec.rb +17 -17
- data/spec/unit/provider/package/portage_spec.rb +18 -18
- data/spec/unit/provider/package/rpm_spec.rb +7 -7
- data/spec/unit/provider/package/rubygems_spec.rb +31 -31
- data/spec/unit/provider/package/smartos_spec.rb +4 -4
- data/spec/unit/provider/package/solaris_spec.rb +15 -15
- data/spec/unit/provider/package/yum_spec.rb +100 -100
- data/spec/unit/provider/package/zypper_spec.rb +10 -10
- data/spec/unit/provider/package_spec.rb +21 -21
- data/spec/unit/provider/registry_key_spec.rb +2 -2
- data/spec/unit/provider/remote_file/content_spec.rb +31 -31
- data/spec/unit/provider/remote_file/fetcher_spec.rb +8 -8
- data/spec/unit/provider/remote_file/ftp_spec.rb +10 -10
- data/spec/unit/provider/remote_file/http_spec.rb +4 -4
- data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
- data/spec/unit/provider/remote_file_spec.rb +1 -1
- data/spec/unit/provider/route_spec.rb +23 -23
- data/spec/unit/provider/script_spec.rb +5 -5
- data/spec/unit/provider/service/arch_service_spec.rb +41 -41
- data/spec/unit/provider/service/debian_service_spec.rb +23 -23
- data/spec/unit/provider/service/freebsd_service_spec.rb +33 -33
- data/spec/unit/provider/service/gentoo_service_spec.rb +16 -16
- data/spec/unit/provider/service/init_service_spec.rb +13 -13
- data/spec/unit/provider/service/insserv_service_spec.rb +4 -4
- data/spec/unit/provider/service/invokercd_service_spec.rb +12 -12
- data/spec/unit/provider/service/macosx_spec.rb +20 -20
- data/spec/unit/provider/service/redhat_spec.rb +15 -15
- data/spec/unit/provider/service/simple_service_spec.rb +9 -9
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
- data/spec/unit/provider/service/systemd_service_spec.rb +28 -28
- data/spec/unit/provider/service/upstart_service_spec.rb +41 -41
- data/spec/unit/provider/service/windows_spec.rb +37 -37
- data/spec/unit/provider/service_spec.rb +9 -9
- data/spec/unit/provider/subversion_spec.rb +36 -36
- data/spec/unit/provider/template/content_spec.rb +8 -8
- data/spec/unit/provider/template_spec.rb +1 -1
- data/spec/unit/provider/user/dscl_spec.rb +9 -9
- data/spec/unit/provider/user/pw_spec.rb +20 -20
- data/spec/unit/provider/user/solaris_spec.rb +5 -5
- data/spec/unit/provider/user/windows_spec.rb +8 -8
- data/spec/unit/provider/user_spec.rb +34 -34
- data/spec/unit/provider_spec.rb +3 -3
- data/spec/unit/recipe_spec.rb +79 -4
- data/spec/unit/registry_helper_spec.rb +2 -2
- data/spec/unit/resource/cron_spec.rb +2 -2
- data/spec/unit/resource/directory_spec.rb +5 -5
- data/spec/unit/resource/env_spec.rb +2 -2
- data/spec/unit/resource/erl_call_spec.rb +1 -1
- data/spec/unit/resource/file_spec.rb +8 -8
- data/spec/unit/resource/group_spec.rb +3 -3
- data/spec/unit/resource/link_spec.rb +8 -8
- data/spec/unit/resource/mdadm_spec.rb +3 -3
- data/spec/unit/resource/mount_spec.rb +3 -3
- data/spec/unit/resource/route_spec.rb +2 -2
- data/spec/unit/resource/user_spec.rb +2 -2
- data/spec/unit/resource/yum_package_spec.rb +2 -2
- data/spec/unit/resource_collection_spec.rb +1 -1
- data/spec/unit/resource_definition_spec.rb +2 -2
- data/spec/unit/resource_reporter_spec.rb +71 -16
- data/spec/unit/resource_spec.rb +3 -3
- data/spec/unit/rest/auth_credentials_spec.rb +2 -2
- data/spec/unit/rest_spec.rb +3 -40
- data/spec/unit/run_list/run_list_expansion_spec.rb +3 -3
- data/spec/unit/run_list_spec.rb +9 -9
- data/spec/unit/run_status_spec.rb +1 -1
- data/spec/unit/runner_spec.rb +8 -8
- data/spec/unit/scan_access_control_spec.rb +3 -3
- data/spec/unit/search/query_spec.rb +7 -7
- data/spec/unit/shell/model_wrapper_spec.rb +2 -2
- data/spec/unit/shell/shell_ext_spec.rb +15 -15
- data/spec/unit/shell/shell_session_spec.rb +9 -9
- data/spec/unit/shell_spec.rb +1 -2
- data/spec/unit/user_spec.rb +4 -4
- data/spec/unit/util/backup_spec.rb +1 -1
- data/spec/unit/util/selinux_spec.rb +7 -7
- metadata +106 -51
- data/distro/common/html/chef-client.8.html +0 -145
- data/distro/common/html/chef-expander.8.html +0 -164
- data/distro/common/html/chef-expanderctl.8.html +0 -146
- data/distro/common/html/chef-server-webui.8.html +0 -185
- data/distro/common/html/chef-server.8.html +0 -182
- data/distro/common/html/chef-shell.1.html +0 -286
- data/distro/common/html/chef-solo.8.html +0 -185
- data/distro/common/html/chef-solr.8.html +0 -165
- data/distro/common/html/knife-bootstrap.1.html +0 -241
- data/distro/common/html/knife-client.1.html +0 -219
- data/distro/common/html/knife-configure.1.html +0 -170
- data/distro/common/html/knife-cookbook-site.1.html +0 -241
- data/distro/common/html/knife-cookbook.1.html +0 -381
- data/distro/common/html/knife-data-bag.1.html +0 -235
- data/distro/common/html/knife-environment.1.html +0 -265
- data/distro/common/html/knife-exec.1.html +0 -134
- data/distro/common/html/knife-index.1.html +0 -125
- data/distro/common/html/knife-node.1.html +0 -250
- data/distro/common/html/knife-role.1.html +0 -200
- data/distro/common/html/knife-search.1.html +0 -288
- data/distro/common/html/knife-ssh.1.html +0 -156
- data/distro/common/html/knife-status.1.html +0 -128
- data/distro/common/html/knife-tag.1.html +0 -137
- 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 — 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 “getting-started”, 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 “pristine copy” 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 “pristine copy” 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 “getting-started”, 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 “apache2”:</p>
|
274
|
+
<div class="highlight-bash"><div class="highlight"><pre><span class="nv">$ </span>knife cookbook site share <span class="s2">"apache2"</span> <span class="s2">"Web Servers"</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 “haproxy”:</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 “getting-started”, 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 — 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 “admins”, 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 “charlie”, 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 “charlie” that is contained in a data bag named “admins”, 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">"id"</span>: <span class="s2">"charlie"</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">"id"</span><span class="o">:</span> <span class="s2">"charlie"</span><span class="p">,</span>
|
174
|
+
<span class="s2">"uid"</span><span class="o">:</span> <span class="mi">1005</span><span class="p">,</span>
|
175
|
+
<span class="s2">"gid"</span><span class="o">:</span><span class="s2">"ops"</span><span class="p">,</span>
|
176
|
+
<span class="s2">"shell"</span><span class="o">:</span><span class="s2">"/bin/zsh"</span><span class="p">,</span>
|
177
|
+
<span class="s2">"comment"</span><span class="o">:</span><span class="s2">"Crazy Charlie"</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">"path to JSON file"</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 “devops_data” 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">"path to decryption file"</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 “passwords” with an item that contains encrypted data named “mysql”, 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>
|