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