chef 18.9.4-universal-mingw-ucrt → 19.1.164-universal-mingw-ucrt
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +24 -22
- data/README.md +6 -2
- data/Rakefile +12 -7
- data/chef-universal-mingw-ucrt.gemspec +1 -1
- data/chef.gemspec +18 -20
- data/lib/chef/action_collection.rb +3 -1
- data/lib/chef/api_client/registration.rb +1 -1
- data/lib/chef/api_client.rb +1 -1
- data/lib/chef/api_client_v1.rb +1 -1
- data/lib/chef/application/apply.rb +31 -4
- data/lib/chef/application/base.rb +38 -7
- data/lib/chef/application/client.rb +15 -1
- data/lib/chef/application/exit_code.rb +4 -2
- data/lib/chef/application/solo.rb +1 -1
- data/lib/chef/application.rb +6 -1
- data/lib/chef/chef_class.rb +1 -1
- data/lib/chef/chef_fs/chef_fs_data_store.rb +1 -1
- data/lib/chef/chef_fs/command_line.rb +8 -7
- data/lib/chef/chef_fs/config.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +1 -1
- data/lib/chef/chef_fs/file_system/base_fs_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/base_fs_object.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +3 -4
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/exceptions.rb +1 -1
- data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/acl.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/acls_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +7 -6
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/client.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/client_key.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/clients_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/container.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/containers_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/data_bag.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/data_bag_item.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/environment.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/environments_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/group.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/groups_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/node.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/policies_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/policy.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/policy_group.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/role.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/roles_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/user.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/users_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system.rb +1 -1
- data/lib/chef/chef_fs/file_system_cache.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +1 -1
- data/lib/chef/client.rb +11 -2
- data/lib/chef/compliance/default_attributes.rb +1 -1
- data/lib/chef/compliance/fetcher/chef_server.rb +2 -2
- data/lib/chef/compliance/input.rb +1 -1
- data/lib/chef/compliance/input_collection.rb +1 -1
- data/lib/chef/compliance/profile.rb +1 -1
- data/lib/chef/compliance/profile_collection.rb +1 -1
- data/lib/chef/compliance/reporter/cli.rb +2 -2
- data/lib/chef/compliance/runner.rb +19 -1
- data/lib/chef/compliance/waiver.rb +1 -1
- data/lib/chef/compliance/waiver_collection.rb +1 -1
- data/lib/chef/config.rb +1 -1
- data/lib/chef/constants.rb +1 -1
- data/lib/chef/context.rb +53 -0
- data/lib/chef/cookbook/chefignore.rb +2 -2
- data/lib/chef/cookbook/cookbook_collection.rb +1 -1
- data/lib/chef/cookbook/cookbook_version_loader.rb +2 -1
- data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
- data/lib/chef/cookbook/file_vendor.rb +1 -1
- data/lib/chef/cookbook/gem_installer.rb +1 -1
- data/lib/chef/cookbook/manifest_v0.rb +1 -1
- data/lib/chef/cookbook/manifest_v2.rb +1 -1
- data/lib/chef/cookbook/metadata.rb +1 -1
- data/lib/chef/cookbook/remote_file_vendor.rb +1 -1
- data/lib/chef/cookbook/synchronizer.rb +5 -0
- data/lib/chef/cookbook/syntax_check.rb +1 -1
- data/lib/chef/cookbook_loader.rb +1 -1
- data/lib/chef/cookbook_manifest.rb +1 -1
- data/lib/chef/cookbook_version.rb +3 -3
- data/lib/chef/daemon.rb +1 -1
- data/lib/chef/data_bag.rb +3 -3
- data/lib/chef/data_bag_item.rb +2 -2
- data/lib/chef/data_collector/config_validation.rb +1 -1
- data/lib/chef/data_collector/error_handlers.rb +1 -1
- data/lib/chef/data_collector/message_helpers.rb +1 -1
- data/lib/chef/data_collector/run_end_message.rb +1 -1
- data/lib/chef/data_collector/run_start_message.rb +2 -2
- data/lib/chef/data_collector.rb +2 -2
- data/lib/chef/decorator/lazy.rb +1 -1
- data/lib/chef/decorator/lazy_array.rb +1 -1
- data/lib/chef/decorator.rb +1 -1
- data/lib/chef/delayed_evaluator.rb +1 -1
- data/lib/chef/deprecated.rb +1 -1
- data/lib/chef/deprecation/warnings.rb +1 -1
- data/lib/chef/digester.rb +1 -1
- data/lib/chef/dsl/chef_vault.rb +3 -3
- data/lib/chef/dsl/cheffish.rb +1 -1
- data/lib/chef/dsl/compliance.rb +1 -1
- data/lib/chef/dsl/data_query.rb +1 -1
- data/lib/chef/dsl/declare_resource.rb +1 -1
- data/lib/chef/dsl/include_attribute.rb +1 -1
- data/lib/chef/dsl/include_recipe.rb +1 -1
- data/lib/chef/dsl/platform_introspection.rb +1 -1
- data/lib/chef/dsl/powershell.rb +1 -1
- data/lib/chef/dsl/reader_helpers.rb +3 -1
- data/lib/chef/dsl/reboot_pending.rb +1 -1
- data/lib/chef/dsl/recipe.rb +1 -1
- data/lib/chef/dsl/registry_helper.rb +1 -1
- data/lib/chef/dsl/render_helpers.rb +1 -1
- data/lib/chef/dsl/resources.rb +1 -1
- data/lib/chef/dsl/rest_resource.rb +165 -5
- data/lib/chef/dsl/secret.rb +1 -1
- data/lib/chef/dsl/universal.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/check_encrypted.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +2 -6
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +1 -1
- data/lib/chef/encrypted_data_bag_item.rb +1 -1
- data/lib/chef/environment.rb +2 -2
- data/lib/chef/event_loggers/base.rb +1 -1
- data/lib/chef/event_loggers/windows_eventlog.rb +1 -1
- data/lib/chef/exceptions.rb +2 -12
- data/lib/chef/file_access_control/unix.rb +10 -10
- data/lib/chef/file_access_control/windows.rb +1 -1
- data/lib/chef/file_access_control.rb +1 -1
- data/lib/chef/file_cache.rb +2 -6
- data/lib/chef/file_content_management/content_base.rb +1 -1
- data/lib/chef/file_content_management/deploy/cp.rb +1 -1
- data/lib/chef/file_content_management/deploy/mv_unix.rb +1 -1
- data/lib/chef/file_content_management/deploy/mv_windows.rb +1 -1
- data/lib/chef/file_content_management/deploy/target_io.rb +27 -0
- data/lib/chef/file_content_management/deploy.rb +5 -2
- data/lib/chef/file_content_management/tempfile.rb +1 -1
- data/lib/chef/formatters/base.rb +1 -1
- data/lib/chef/formatters/error_description.rb +1 -1
- data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +1 -1
- data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +2 -2
- data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +2 -1
- data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +2 -1
- data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +1 -1
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +1 -1
- data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +1 -1
- data/lib/chef/formatters/error_mapper.rb +1 -1
- data/lib/chef/group.rb +2 -2
- data/lib/chef/guard_interpreter/default_guard_interpreter.rb +1 -1
- data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +1 -1
- data/lib/chef/guard_interpreter.rb +1 -1
- data/lib/chef/handler/error_report.rb +1 -1
- data/lib/chef/handler/json_file.rb +1 -1
- data/lib/chef/handler/slow_report.rb +2 -2
- data/lib/chef/handler.rb +1 -1
- data/lib/chef/http/api_versions.rb +1 -1
- data/lib/chef/http/auth_credentials.rb +1 -1
- data/lib/chef/http/authenticator.rb +1 -1
- data/lib/chef/http/basic_client.rb +1 -2
- data/lib/chef/http/cookie_jar.rb +1 -1
- data/lib/chef/http/cookie_manager.rb +1 -1
- data/lib/chef/http/decompressor.rb +1 -1
- data/lib/chef/http/http_request.rb +17 -16
- data/lib/chef/http/json_input.rb +1 -1
- data/lib/chef/http/json_output.rb +1 -1
- data/lib/chef/http/json_to_model_output.rb +1 -1
- data/lib/chef/http/remote_request_id.rb +1 -1
- data/lib/chef/http/simple.rb +1 -1
- data/lib/chef/http/simple_json.rb +1 -1
- data/lib/chef/http/socketless_chef_zero_client.rb +1 -1
- data/lib/chef/http/ssl_policies.rb +1 -1
- data/lib/chef/http/validate_content_length.rb +1 -1
- data/lib/chef/http.rb +1 -2
- data/lib/chef/json_compat.rb +1 -1
- data/lib/chef/key.rb +1 -1
- data/lib/chef/licensing.rb +105 -0
- data/lib/chef/licensing_config.rb +20 -0
- data/lib/chef/local_mode.rb +1 -1
- data/lib/chef/log/syslog.rb +1 -1
- data/lib/chef/log/winevt.rb +1 -1
- data/lib/chef/log.rb +1 -1
- data/lib/chef/mash.rb +1 -1
- data/lib/chef/mixin/api_version_request_handling.rb +2 -2
- data/lib/chef/mixin/checksum.rb +1 -1
- data/lib/chef/mixin/chef_utils_wiring.rb +1 -1
- data/lib/chef/mixin/convert_to_class_name.rb +1 -1
- data/lib/chef/mixin/create_path.rb +1 -1
- data/lib/chef/mixin/deep_merge.rb +1 -1
- data/lib/chef/mixin/default_paths.rb +1 -1
- data/lib/chef/mixin/deprecation.rb +1 -1
- data/lib/chef/mixin/enforce_ownership_and_permissions.rb +1 -1
- data/lib/chef/mixin/file_class.rb +4 -2
- data/lib/chef/mixin/from_file.rb +1 -1
- data/lib/chef/mixin/get_source_from_package.rb +2 -2
- data/lib/chef/mixin/homebrew.rb +3 -4
- data/lib/chef/mixin/lazy_module_include.rb +1 -1
- data/lib/chef/mixin/notifying_block.rb +1 -1
- data/lib/chef/mixin/openssl_helper.rb +1 -1
- data/lib/chef/mixin/params_validate.rb +1 -1
- data/lib/chef/mixin/path_sanity.rb +1 -1
- data/lib/chef/mixin/powershell_exec.rb +1 -1
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/mixin/powershell_type_coercions.rb +3 -3
- data/lib/chef/mixin/proxified_socket.rb +1 -1
- data/lib/chef/mixin/securable.rb +3 -3
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/mixin/subclass_directive.rb +1 -1
- data/lib/chef/mixin/template.rb +2 -2
- data/lib/chef/mixin/unformatter.rb +1 -1
- data/lib/chef/mixin/uris.rb +1 -1
- data/lib/chef/mixin/user_context.rb +1 -1
- data/lib/chef/mixin/versioned_api.rb +2 -2
- data/lib/chef/mixin/which.rb +1 -1
- data/lib/chef/mixin/why_run.rb +1 -1
- data/lib/chef/mixin/wide_string.rb +1 -1
- data/lib/chef/mixin/windows_architecture_helper.rb +1 -1
- data/lib/chef/mixin/windows_env_helper.rb +1 -1
- data/lib/chef/mixin/xml_escape.rb +1 -1
- data/lib/chef/monkey_patches/net-http.rb +2 -3
- data/lib/chef/monkey_patches/win32/registry.rb +1 -1
- data/lib/chef/node/attribute.rb +1 -1
- data/lib/chef/node/attribute_collections.rb +1 -1
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/immutable_collections.rb +1 -1
- data/lib/chef/node/mixin/deep_merge_cache.rb +1 -1
- data/lib/chef/node/mixin/immutablize_array.rb +27 -1
- data/lib/chef/node/mixin/immutablize_hash.rb +36 -1
- data/lib/chef/node/mixin/mashy_array.rb +1 -1
- data/lib/chef/node/mixin/state_tracking.rb +1 -1
- data/lib/chef/node/mixin/state_tracking_array.rb +1 -1
- data/lib/chef/node.rb +1 -1
- data/lib/chef/node_map.rb +15 -3
- data/lib/chef/null_logger.rb +1 -1
- data/lib/chef/org.rb +1 -1
- data/lib/chef/platform/priority_map.rb +1 -1
- data/lib/chef/platform/provider_handler_map.rb +1 -1
- data/lib/chef/platform/provider_mapping.rb +1 -1
- data/lib/chef/platform/query_helpers.rb +1 -1
- data/lib/chef/platform/rebooter.rb +1 -1
- data/lib/chef/platform/resource_handler_map.rb +1 -1
- data/lib/chef/platform/service_helpers.rb +1 -1
- data/lib/chef/platform.rb +1 -1
- data/lib/chef/policy_builder/dynamic.rb +1 -1
- data/lib/chef/policy_builder/expand_node_object.rb +1 -1
- data/lib/chef/policy_builder/policyfile.rb +1 -1
- data/lib/chef/policy_builder.rb +1 -1
- data/lib/chef/property.rb +2 -2
- data/lib/chef/provider/batch.rb +1 -1
- data/lib/chef/provider/cookbook_file/content.rb +1 -1
- data/lib/chef/provider/cookbook_file.rb +2 -2
- data/lib/chef/provider/cron/aix.rb +1 -1
- data/lib/chef/provider/cron/solaris.rb +1 -1
- data/lib/chef/provider/cron.rb +15 -5
- data/lib/chef/provider/directory.rb +27 -16
- data/lib/chef/provider/dsc_resource.rb +3 -3
- data/lib/chef/provider/dsc_script.rb +1 -1
- data/lib/chef/provider/execute.rb +3 -2
- data/lib/chef/provider/file/content.rb +1 -1
- data/lib/chef/provider/file.rb +43 -30
- data/lib/chef/provider/git.rb +9 -9
- data/lib/chef/provider/group/aix.rb +1 -1
- data/lib/chef/provider/group/dscl.rb +2 -2
- data/lib/chef/provider/group/gpasswd.rb +3 -3
- data/lib/chef/provider/group/groupadd.rb +2 -2
- data/lib/chef/provider/group/groupmod.rb +3 -3
- data/lib/chef/provider/group/pw.rb +3 -3
- data/lib/chef/provider/group/solaris.rb +3 -3
- data/lib/chef/provider/group/usermod.rb +3 -3
- data/lib/chef/provider/group.rb +2 -2
- data/lib/chef/provider/http_request.rb +3 -4
- data/lib/chef/provider/ifconfig/aix.rb +2 -2
- data/lib/chef/provider/ifconfig/debian.rb +4 -4
- data/lib/chef/provider/ifconfig/redhat.rb +1 -1
- data/lib/chef/provider/ifconfig.rb +1 -1
- data/lib/chef/provider/link.rb +22 -11
- data/lib/chef/provider/lwrp_base.rb +1 -1
- data/lib/chef/provider/mount/aix.rb +5 -5
- data/lib/chef/provider/mount/linux.rb +5 -5
- data/lib/chef/provider/mount/mount.rb +12 -12
- data/lib/chef/provider/mount/solaris.rb +1 -1
- data/lib/chef/provider/mount/windows.rb +1 -1
- data/lib/chef/provider/mount.rb +1 -1
- data/lib/chef/provider/noop.rb +1 -1
- data/lib/chef/provider/package/apt.rb +1 -1
- data/lib/chef/provider/package/bff.rb +4 -4
- data/lib/chef/provider/package/cab.rb +1 -1
- data/lib/chef/provider/package/chocolatey.rb +1 -1
- data/lib/chef/provider/package/deb.rb +1 -1
- data/lib/chef/provider/package/dnf/python_helper.rb +3 -3
- data/lib/chef/provider/package/dnf/version.rb +1 -1
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/dpkg.rb +6 -6
- data/lib/chef/provider/package/freebsd/base.rb +1 -1
- data/lib/chef/provider/package/habitat.rb +6 -6
- data/lib/chef/provider/package/homebrew.rb +4 -4
- data/lib/chef/provider/package/ips.rb +3 -3
- data/lib/chef/provider/package/msu.rb +1 -1
- data/lib/chef/provider/package/openbsd.rb +3 -2
- data/lib/chef/provider/package/pacman.rb +4 -4
- data/lib/chef/provider/package/paludis.rb +3 -3
- data/lib/chef/provider/package/portage.rb +3 -3
- data/lib/chef/provider/package/powershell.rb +1 -1
- data/lib/chef/provider/package/rpm.rb +3 -3
- data/lib/chef/provider/package/rubygems.rb +19 -3
- data/lib/chef/provider/package/smartos.rb +2 -2
- data/lib/chef/provider/package/snap.rb +20 -8
- data/lib/chef/provider/package/snap_tm.rb +79 -0
- data/lib/chef/provider/package/solaris.rb +5 -5
- data/lib/chef/provider/package/windows/exe.rb +2 -2
- data/lib/chef/provider/package/windows/msi.rb +2 -2
- data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +1 -1
- data/lib/chef/provider/package/windows.rb +1 -1
- data/lib/chef/provider/package/yum/python_helper.rb +1 -1
- data/lib/chef/provider/package/yum/rpm_utils.rb +3 -3
- data/lib/chef/provider/package/yum/version.rb +1 -1
- data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/package/yum_tm.rb +132 -0
- data/lib/chef/provider/package/zypper/version.rb +1 -1
- data/lib/chef/provider/package/zypper.rb +5 -5
- data/lib/chef/provider/package.rb +2 -2
- data/lib/chef/provider/powershell_script.rb +1 -1
- data/lib/chef/provider/registry_key.rb +2 -1
- data/lib/chef/provider/remote_directory.rb +6 -6
- data/lib/chef/provider/remote_file/cache_control_data.rb +1 -1
- data/lib/chef/provider/remote_file/content.rb +1 -1
- data/lib/chef/provider/remote_file/fetcher.rb +1 -1
- data/lib/chef/provider/remote_file/http.rb +2 -3
- data/lib/chef/provider/remote_file.rb +2 -2
- data/lib/chef/provider/route.rb +10 -10
- data/lib/chef/provider/ruby_block.rb +1 -1
- data/lib/chef/provider/script.rb +8 -8
- data/lib/chef/provider/service/aix.rb +2 -2
- data/lib/chef/provider/service/aixinit.rb +6 -6
- data/lib/chef/provider/service/arch.rb +6 -6
- data/lib/chef/provider/service/debian.rb +9 -11
- data/lib/chef/provider/service/freebsd.rb +7 -7
- data/lib/chef/provider/service/gentoo.rb +6 -6
- data/lib/chef/provider/service/init.rb +3 -3
- data/lib/chef/provider/service/insserv.rb +3 -3
- data/lib/chef/provider/service/invokercd.rb +2 -2
- data/lib/chef/provider/service/macosx.rb +1 -1
- data/lib/chef/provider/service/openbsd.rb +7 -7
- data/lib/chef/provider/service/redhat.rb +6 -6
- data/lib/chef/provider/service/solaris.rb +3 -3
- data/lib/chef/provider/service/systemd.rb +3 -3
- data/lib/chef/provider/service/upstart.rb +3 -3
- data/lib/chef/provider/service/windows.rb +1 -1
- data/lib/chef/provider/service.rb +1 -1
- data/lib/chef/provider/subversion.rb +10 -10
- data/lib/chef/provider/systemd_unit.rb +3 -3
- data/lib/chef/provider/template/content.rb +1 -1
- data/lib/chef/provider/template.rb +2 -2
- data/lib/chef/provider/template_finder.rb +1 -1
- data/lib/chef/provider/user/aix.rb +4 -4
- data/lib/chef/provider/user/dscl.rb +2 -2
- data/lib/chef/provider/user/linux.rb +8 -3
- data/lib/chef/provider/user/mac.rb +2 -2
- data/lib/chef/provider/user/pw.rb +4 -4
- data/lib/chef/provider/user/solaris.rb +8 -8
- data/lib/chef/provider/user.rb +7 -4
- data/lib/chef/provider/windows_script.rb +1 -1
- data/lib/chef/provider/yum_repository.rb +2 -4
- data/lib/chef/provider/zypper_repository.rb +2 -2
- data/lib/chef/provider.rb +1 -1
- data/lib/chef/providers.rb +3 -1
- data/lib/chef/pwsh.rb +1 -1
- data/lib/chef/recipe.rb +9 -6
- data/lib/chef/request_id.rb +1 -1
- data/lib/chef/resource/_rest_resource.rb +153 -8
- data/lib/chef/resource/action_class.rb +1 -1
- data/lib/chef/resource/alternatives.rb +5 -4
- data/lib/chef/resource/apt_package.rb +7 -2
- data/lib/chef/resource/apt_preference.rb +3 -2
- data/lib/chef/resource/apt_repository.rb +18 -13
- data/lib/chef/resource/apt_update.rb +5 -4
- data/lib/chef/resource/archive_file.rb +21 -21
- data/lib/chef/resource/bash.rb +3 -2
- data/lib/chef/resource/batch.rb +1 -1
- data/lib/chef/resource/bff_package.rb +3 -2
- data/lib/chef/resource/breakpoint.rb +2 -1
- data/lib/chef/resource/build_essential.rb +1 -1
- data/lib/chef/resource/cab_package.rb +1 -1
- data/lib/chef/resource/chef_client_config.rb +5 -8
- data/lib/chef/resource/chef_client_cron.rb +5 -3
- data/lib/chef/resource/chef_client_hab_ca_cert.rb +141 -0
- data/lib/chef/resource/chef_client_launchd.rb +7 -3
- data/lib/chef/resource/chef_client_scheduled_task.rb +6 -3
- data/lib/chef/resource/chef_client_systemd_timer.rb +5 -2
- data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -1
- data/lib/chef/resource/chef_gem.rb +1 -1
- data/lib/chef/resource/chef_handler.rb +1 -1
- data/lib/chef/resource/chef_sleep.rb +3 -2
- data/lib/chef/resource/chef_vault_secret.rb +1 -1
- data/lib/chef/resource/chocolatey_config.rb +1 -1
- data/lib/chef/resource/chocolatey_feature.rb +1 -1
- data/lib/chef/resource/chocolatey_installer.rb +5 -20
- data/lib/chef/resource/chocolatey_package.rb +1 -1
- data/lib/chef/resource/chocolatey_source.rb +1 -1
- data/lib/chef/resource/conditional.rb +1 -1
- data/lib/chef/resource/cookbook_file.rb +3 -2
- data/lib/chef/resource/cron/_cron_shared.rb +1 -3
- data/lib/chef/resource/cron/cron.rb +2 -1
- data/lib/chef/resource/cron/cron_d.rb +3 -2
- data/lib/chef/resource/cron_access.rb +3 -2
- data/lib/chef/resource/csh.rb +8 -7
- data/lib/chef/resource/directory.rb +8 -7
- data/lib/chef/resource/dmg_package.rb +1 -1
- data/lib/chef/resource/dnf_package.rb +2 -2
- data/lib/chef/resource/dpkg_package.rb +6 -3
- data/lib/chef/resource/dsc_resource.rb +1 -1
- data/lib/chef/resource/dsc_script.rb +1 -1
- data/lib/chef/resource/execute.rb +8 -1
- data/lib/chef/resource/file/verification/json.rb +1 -1
- data/lib/chef/resource/file/verification/systemd_unit.rb +5 -2
- data/lib/chef/resource/file/verification/yaml.rb +2 -2
- data/lib/chef/resource/file/verification.rb +4 -1
- data/lib/chef/resource/file.rb +3 -2
- data/lib/chef/resource/freebsd_package.rb +4 -3
- data/lib/chef/resource/gem_package.rb +1 -1
- data/lib/chef/resource/group.rb +7 -4
- data/lib/chef/resource/habitat/_habitat_shared.rb +1 -1
- data/lib/chef/resource/habitat/habitat_package.rb +4 -2
- data/lib/chef/resource/habitat/habitat_sup.rb +17 -18
- data/lib/chef/resource/habitat/habitat_sup_systemd.rb +4 -3
- data/lib/chef/resource/habitat/habitat_sup_windows.rb +2 -1
- data/lib/chef/resource/habitat_config.rb +25 -11
- data/lib/chef/resource/habitat_install.rb +5 -5
- data/lib/chef/resource/habitat_service.rb +9 -5
- data/lib/chef/resource/habitat_user_toml.rb +2 -2
- data/lib/chef/resource/helpers/cron_validations.rb +3 -3
- data/lib/chef/resource/helpers/path_helpers.rb +52 -0
- data/lib/chef/resource/homebrew_cask.rb +2 -2
- data/lib/chef/resource/homebrew_package.rb +1 -1
- data/lib/chef/resource/homebrew_tap.rb +11 -3
- data/lib/chef/resource/homebrew_update.rb +1 -1
- data/lib/chef/resource/hostname.rb +16 -13
- data/lib/chef/resource/http_request.rb +3 -2
- data/lib/chef/resource/ifconfig.rb +2 -1
- data/lib/chef/resource/inspec_input.rb +5 -2
- data/lib/chef/resource/inspec_waiver.rb +3 -2
- data/lib/chef/resource/inspec_waiver_file_entry.rb +3 -2
- data/lib/chef/resource/ips_package.rb +4 -3
- data/lib/chef/resource/kernel_module.rb +4 -3
- data/lib/chef/resource/ksh.rb +8 -7
- data/lib/chef/resource/launchd.rb +1 -1
- data/lib/chef/resource/link.rb +12 -11
- data/lib/chef/resource/locale.rb +5 -4
- data/lib/chef/resource/log.rb +7 -5
- data/lib/chef/resource/lwrp_base.rb +1 -1
- data/lib/chef/resource/macos_pkg.rb +1 -1
- data/lib/chef/resource/macos_userdefaults.rb +1 -1
- data/lib/chef/resource/macports_package.rb +1 -1
- data/lib/chef/resource/mdadm.rb +3 -3
- data/lib/chef/resource/mount.rb +4 -2
- data/lib/chef/resource/msu_package.rb +1 -1
- data/lib/chef/resource/notify_group.rb +3 -2
- data/lib/chef/resource/ohai.rb +5 -4
- data/lib/chef/resource/ohai_hint.rb +3 -2
- data/lib/chef/resource/openbsd_package.rb +4 -3
- data/lib/chef/resource/openssl_dhparam.rb +1 -1
- data/lib/chef/resource/openssl_ec_private_key.rb +2 -2
- data/lib/chef/resource/openssl_ec_public_key.rb +1 -1
- data/lib/chef/resource/openssl_rsa_private_key.rb +1 -1
- data/lib/chef/resource/openssl_rsa_public_key.rb +1 -1
- data/lib/chef/resource/openssl_x509_certificate.rb +6 -2
- data/lib/chef/resource/openssl_x509_crl.rb +1 -1
- data/lib/chef/resource/openssl_x509_request.rb +1 -1
- data/lib/chef/resource/package.rb +10 -9
- data/lib/chef/resource/pacman_package.rb +2 -1
- data/lib/chef/resource/paludis_package.rb +3 -2
- data/lib/chef/resource/perl.rb +8 -7
- data/lib/chef/resource/plist.rb +2 -2
- data/lib/chef/resource/portage_package.rb +3 -2
- data/lib/chef/resource/powershell_package.rb +1 -1
- data/lib/chef/resource/powershell_script.rb +1 -1
- data/lib/chef/resource/python.rb +7 -6
- data/lib/chef/resource/reboot.rb +8 -7
- data/lib/chef/resource/registry_key.rb +1 -6
- data/lib/chef/resource/remote_directory.rb +3 -2
- data/lib/chef/resource/remote_file.rb +4 -3
- data/lib/chef/resource/resource_notification.rb +5 -5
- data/lib/chef/resource/rhsm_errata.rb +3 -2
- data/lib/chef/resource/rhsm_errata_level.rb +4 -3
- data/lib/chef/resource/rhsm_register.rb +12 -3
- data/lib/chef/resource/rhsm_repo.rb +5 -5
- data/lib/chef/resource/rhsm_subscription.rb +10 -10
- data/lib/chef/resource/route.rb +2 -1
- data/lib/chef/resource/rpm_package.rb +3 -2
- data/lib/chef/resource/ruby.rb +4 -2
- data/lib/chef/resource/ruby_block.rb +3 -1
- data/lib/chef/resource/scm/_scm.rb +1 -1
- data/lib/chef/resource/scm/git.rb +6 -5
- data/lib/chef/resource/scm/subversion.rb +3 -2
- data/lib/chef/resource/script.rb +7 -5
- data/lib/chef/resource/selinux/common_helpers.rb +1 -1
- data/lib/chef/resource/selinux/selinux_debian.erb +1 -1
- data/lib/chef/resource/selinux/selinux_default.erb +1 -1
- data/lib/chef/resource/selinux_boolean.rb +2 -1
- data/lib/chef/resource/selinux_fcontext.rb +4 -3
- data/lib/chef/resource/selinux_install.rb +2 -1
- data/lib/chef/resource/selinux_login.rb +2 -1
- data/lib/chef/resource/selinux_module.rb +6 -5
- data/lib/chef/resource/selinux_permissive.rb +3 -2
- data/lib/chef/resource/selinux_port.rb +3 -2
- data/lib/chef/resource/selinux_state.rb +3 -2
- data/lib/chef/resource/selinux_user.rb +2 -1
- data/lib/chef/resource/service.rb +4 -1
- data/lib/chef/resource/smartos_package.rb +4 -3
- data/lib/chef/resource/snap_package.rb +16 -7
- data/lib/chef/resource/solaris_package.rb +3 -2
- data/lib/chef/resource/ssh_known_hosts_entry.rb +3 -2
- data/lib/chef/resource/sudo.rb +11 -10
- data/lib/chef/resource/swap_file.rb +8 -7
- data/lib/chef/resource/sysctl.rb +7 -6
- data/lib/chef/resource/systemd_unit.rb +4 -1
- data/lib/chef/resource/template.rb +3 -2
- data/lib/chef/resource/timezone.rb +7 -6
- data/lib/chef/resource/user/aix_user.rb +4 -3
- data/lib/chef/resource/user/linux_user.rb +4 -4
- data/lib/chef/resource/user/mac_user.rb +2 -1
- data/lib/chef/resource/user/pw_user.rb +4 -3
- data/lib/chef/resource/user/solaris_user.rb +4 -3
- data/lib/chef/resource/user/windows_user.rb +2 -1
- data/lib/chef/resource/user.rb +2 -1
- data/lib/chef/resource/user_ulimit.rb +3 -2
- data/lib/chef/resource/windows_ad_join.rb +2 -2
- data/lib/chef/resource/windows_audit_policy.rb +1 -1
- data/lib/chef/resource/windows_auto_run.rb +2 -2
- data/lib/chef/resource/windows_certificate.rb +1 -1
- data/lib/chef/resource/windows_defender.rb +1 -1
- data/lib/chef/resource/windows_defender_exclusion.rb +1 -1
- data/lib/chef/resource/windows_dfs_folder.rb +1 -1
- data/lib/chef/resource/windows_dfs_namespace.rb +1 -1
- data/lib/chef/resource/windows_dfs_server.rb +1 -1
- data/lib/chef/resource/windows_dns_record.rb +1 -1
- data/lib/chef/resource/windows_dns_zone.rb +1 -1
- data/lib/chef/resource/windows_feature.rb +1 -1
- data/lib/chef/resource/windows_feature_dism.rb +1 -1
- data/lib/chef/resource/windows_feature_powershell.rb +1 -1
- data/lib/chef/resource/windows_firewall_profile.rb +1 -1
- data/lib/chef/resource/windows_firewall_rule.rb +1 -1
- data/lib/chef/resource/windows_font.rb +2 -2
- data/lib/chef/resource/windows_package.rb +2 -2
- data/lib/chef/resource/windows_pagefile.rb +3 -3
- data/lib/chef/resource/windows_path.rb +1 -1
- data/lib/chef/resource/windows_printer.rb +1 -1
- data/lib/chef/resource/windows_printer_port.rb +1 -1
- data/lib/chef/resource/windows_script.rb +1 -1
- data/lib/chef/resource/windows_security_policy.rb +1 -1
- data/lib/chef/resource/windows_service.rb +2 -2
- data/lib/chef/resource/windows_share.rb +4 -4
- data/lib/chef/resource/windows_shortcut.rb +1 -1
- data/lib/chef/resource/windows_task.rb +3 -5
- data/lib/chef/resource/windows_uac.rb +1 -1
- data/lib/chef/resource/windows_update_settings.rb +3 -3
- data/lib/chef/resource/windows_user_privilege.rb +3 -3
- data/lib/chef/resource/windows_workgroup.rb +1 -1
- data/lib/chef/resource/yum_package.rb +5 -4
- data/lib/chef/resource/yum_repository.rb +3 -2
- data/lib/chef/resource/zypper_package.rb +3 -2
- data/lib/chef/resource/zypper_repository.rb +4 -3
- data/lib/chef/resource.rb +12 -4
- data/lib/chef/resource_builder.rb +1 -1
- data/lib/chef/resource_collection/resource_collection_serialization.rb +1 -1
- data/lib/chef/resource_collection/resource_list.rb +1 -1
- data/lib/chef/resource_collection/resource_set.rb +12 -7
- data/lib/chef/resource_collection.rb +1 -1
- data/lib/chef/resource_definition.rb +1 -1
- data/lib/chef/resource_definition_list.rb +1 -1
- data/lib/chef/resource_inspector.rb +4 -3
- data/lib/chef/resource_reporter.rb +2 -1
- data/lib/chef/resource_resolver.rb +1 -1
- data/lib/chef/resources.rb +2 -2
- data/lib/chef/role.rb +1 -1
- data/lib/chef/run_context/cookbook_compiler.rb +1 -1
- data/lib/chef/run_context.rb +2 -2
- data/lib/chef/run_list/run_list_expansion.rb +1 -1
- data/lib/chef/run_list/run_list_item.rb +5 -5
- data/lib/chef/run_list/versioned_recipe_list.rb +1 -1
- data/lib/chef/run_list.rb +1 -1
- data/lib/chef/run_lock.rb +4 -1
- data/lib/chef/run_status.rb +1 -1
- data/lib/chef/runner.rb +2 -2
- data/lib/chef/scan_access_control.rb +9 -7
- data/lib/chef/search/query.rb +1 -1
- data/lib/chef/secret_fetcher/akeyless_vault.rb +1 -2
- data/lib/chef/secret_fetcher/aws_secrets_manager.rb +1 -1
- data/lib/chef/secret_fetcher/base.rb +1 -1
- data/lib/chef/secret_fetcher/example.rb +1 -1
- data/lib/chef/secret_fetcher/hashi_vault.rb +10 -2
- data/lib/chef/secret_fetcher.rb +1 -1
- data/lib/chef/server_api.rb +1 -1
- data/lib/chef/server_api_versions.rb +1 -1
- data/lib/chef/shell/model_wrapper.rb +1 -1
- data/lib/chef/shell/shell_session.rb +1 -1
- data/lib/chef/shell.rb +30 -8
- data/lib/chef/target_io/dir.rb +12 -0
- data/lib/chef/target_io/etc.rb +16 -0
- data/lib/chef/target_io/file.rb +12 -0
- data/lib/chef/target_io/fileutils.rb +12 -0
- data/lib/chef/target_io/http.rb +35 -0
- data/lib/chef/target_io/io.rb +12 -0
- data/lib/chef/target_io/shadow.rb +44 -0
- data/lib/chef/target_io/support.rb +73 -0
- data/lib/chef/target_io/train/dir.rb +86 -0
- data/lib/chef/target_io/train/etc.rb +108 -0
- data/lib/chef/target_io/train/file.rb +219 -0
- data/lib/chef/target_io/train/fileutils.rb +201 -0
- data/lib/chef/target_io/train/http.rb +117 -0
- data/lib/chef/target_io/train/io.rb +13 -0
- data/lib/chef/target_io/train/shadow.rb +54 -0
- data/lib/chef/target_io/train_compat.rb +7 -0
- data/lib/chef/target_io.rb +11 -0
- data/lib/chef/train_transport.rb +1 -1
- data/lib/chef/user.rb +1 -1
- data/lib/chef/user_v1.rb +1 -1
- data/lib/chef/util/backup.rb +2 -2
- data/lib/chef/util/diff.rb +15 -2
- data/lib/chef/util/dsc/configuration_generator.rb +1 -1
- data/lib/chef/util/dsc/lcm_output_parser.rb +1 -1
- data/lib/chef/util/dsc/local_configuration_manager.rb +1 -1
- data/lib/chef/util/dsc/resource_store.rb +1 -1
- data/lib/chef/util/editor.rb +1 -1
- data/lib/chef/util/file_edit.rb +5 -5
- data/lib/chef/util/path_helper.rb +1 -1
- data/lib/chef/util/powershell/ps_credential.rb +1 -1
- data/lib/chef/util/selinux.rb +1 -1
- data/lib/chef/util/threaded_job_queue.rb +1 -1
- data/lib/chef/util/windows/logon_session.rb +1 -1
- data/lib/chef/version.rb +2 -2
- data/lib/chef/version_class.rb +1 -1
- data/lib/chef/version_constraint.rb +2 -2
- data/lib/chef/win32/api/command_line_helper.rb +1 -1
- data/lib/chef/win32/api/crypto.rb +1 -1
- data/lib/chef/win32/api/error.rb +1 -1
- data/lib/chef/win32/api/file.rb +3 -2
- data/lib/chef/win32/api/installer.rb +1 -1
- data/lib/chef/win32/api/memory.rb +1 -1
- data/lib/chef/win32/api/net.rb +1 -1
- data/lib/chef/win32/api/process.rb +1 -1
- data/lib/chef/win32/api/psapi.rb +1 -1
- data/lib/chef/win32/api/registry.rb +1 -1
- data/lib/chef/win32/api/security.rb +1 -1
- data/lib/chef/win32/api/synchronization.rb +1 -1
- data/lib/chef/win32/api/system.rb +1 -1
- data/lib/chef/win32/api/unicode.rb +1 -1
- data/lib/chef/win32/api.rb +1 -1
- data/lib/chef/win32/crypto.rb +1 -1
- data/lib/chef/win32/error.rb +3 -2
- data/lib/chef/win32/eventlog.rb +1 -1
- data/lib/chef/win32/file/info.rb +1 -1
- data/lib/chef/win32/file/version_info.rb +2 -2
- data/lib/chef/win32/file.rb +1 -1
- data/lib/chef/win32/handle.rb +1 -1
- data/lib/chef/win32/memory.rb +1 -1
- data/lib/chef/win32/mutex.rb +1 -1
- data/lib/chef/win32/net.rb +1 -1
- data/lib/chef/win32/process.rb +1 -1
- data/lib/chef/win32/registry.rb +4 -2
- data/lib/chef/win32/security/ace.rb +1 -1
- data/lib/chef/win32/security/acl.rb +1 -1
- data/lib/chef/win32/security/securable_object.rb +1 -1
- data/lib/chef/win32/security/security_descriptor.rb +1 -1
- data/lib/chef/win32/security/sid.rb +1 -1
- data/lib/chef/win32/security/token.rb +1 -1
- data/lib/chef/win32/security.rb +1 -1
- data/lib/chef/win32/system.rb +1 -1
- data/lib/chef/win32/unicode.rb +1 -1
- data/lib/chef/win32/version.rb +2 -3
- data/lib/chef/workstation_config_loader.rb +1 -1
- data/lib/chef.rb +3 -1
- metadata +127 -87
- data/distro/powershell/chef/chef.psm1 +0 -459
- data/lib/chef/resource/osx_profile.rb +0 -334
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 20b29034493205764930994cbce1abbda5a180aacd1355e76cefdae1b9fbbe63
|
|
4
|
+
data.tar.gz: 843cf9dbdf899c7fc056ac8fbee4cac9edb2d0df1d4a3bf431325f3c7fc7d10f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa395498423c823b0658f879823237b389edf5611b62a56fae1d0f11c3e6f88ab9084c0fdac3da2a50e202493bf8f22646f94acd237594c90a8c620b09afc6db
|
|
7
|
+
data.tar.gz: d08ecdab46ed667ced17743f5efceb437db3fc322c30a0b225f91d1041f56936a1f4e384c718f081816fa5a02cd5fe4737fa2488f270b02a0d81b199e2875879
|
data/Gemfile
CHANGED
|
@@ -2,18 +2,26 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
gem "chef", path: "."
|
|
4
4
|
|
|
5
|
-
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "
|
|
5
|
+
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "main"
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
gem "cheffish", git: "https://github.com/chef/cheffish.git", branch: "main"
|
|
8
|
+
|
|
9
|
+
# Upstream PR for 3.1 updates: https://github.com/rest-client/rest-client/pull/781
|
|
10
|
+
# Using our fork until they accept it.
|
|
8
11
|
gem "rest-client", git: "https://github.com/chef/rest-client", branch: "jfm/ucrt_update1"
|
|
9
12
|
|
|
10
|
-
|
|
13
|
+
if RUBY_PLATFORM.include?("mingw") || RUBY_PLATFORM.include?("darwin")
|
|
14
|
+
gem "ffi", ">= 1.15.5", "< 1.18.0"
|
|
15
|
+
else
|
|
16
|
+
gem "ffi", ">= 1.15.5", force_ruby_platform: true
|
|
17
|
+
end
|
|
18
|
+
|
|
11
19
|
gem "chef-utils", path: File.expand_path("chef-utils", __dir__) if File.exist?(File.expand_path("chef-utils", __dir__))
|
|
12
20
|
gem "chef-config", path: File.expand_path("chef-config", __dir__) if File.exist?(File.expand_path("chef-config", __dir__))
|
|
13
21
|
|
|
14
22
|
# required for FIPS or bundler will pick up default openssl
|
|
15
|
-
install_if -> {
|
|
16
|
-
gem "openssl", "= 3.3.
|
|
23
|
+
install_if -> { !Gem.platforms.any? { |platform| !platform.is_a?(String) && platform.os == "darwin" } } do
|
|
24
|
+
gem "openssl", "= 3.3.1"
|
|
17
25
|
end
|
|
18
26
|
|
|
19
27
|
if File.exist?(File.expand_path("chef-bin", __dir__))
|
|
@@ -24,30 +32,30 @@ else
|
|
|
24
32
|
gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem
|
|
25
33
|
end
|
|
26
34
|
|
|
27
|
-
gem "cheffish", ">= 17"
|
|
28
|
-
|
|
29
35
|
group(:omnibus_package) do
|
|
30
36
|
gem "appbundler"
|
|
31
37
|
gem "rb-readline"
|
|
38
|
+
gem "inspec-core-bin", "= 7.0.95" # need to provide the binaries for inspec
|
|
32
39
|
gem "chef-vault"
|
|
33
|
-
|
|
34
|
-
gem "inspec-core-bin", ">= 5", "< 6"
|
|
35
40
|
end
|
|
36
41
|
|
|
42
|
+
gem "repl_type_completor", "~> 0.1.12" # deprecation warnings in chef-shell
|
|
43
|
+
|
|
37
44
|
group(:omnibus_package, :pry) do
|
|
38
45
|
# Locked because pry-byebug is broken with 13+.
|
|
39
46
|
# some work is ongoing? https://github.com/deivid-rodriguez/pry-byebug/issues/343
|
|
40
|
-
gem "pry", "
|
|
47
|
+
gem "pry", "~> 0.15.2"
|
|
41
48
|
# byebug does not install on freebsd on ruby 3.0
|
|
42
|
-
|
|
49
|
+
install_if -> { !RUBY_PLATFORM.match?(/freebsd/i) } do
|
|
50
|
+
gem "pry-byebug"
|
|
51
|
+
end
|
|
43
52
|
gem "pry-stack_explorer"
|
|
44
53
|
end
|
|
45
54
|
|
|
46
|
-
# Everything except
|
|
55
|
+
# Everything except Windows
|
|
47
56
|
group(:ruby_shadow) do
|
|
48
|
-
install_if -> { RUBY_PLATFORM.match?(/
|
|
49
|
-
|
|
50
|
-
gem "ruby-shadow", git: "https://github.com/chef/ruby-shadow", branch: "lcg/ruby-3.0", platforms: :ruby
|
|
57
|
+
install_if -> { !RUBY_PLATFORM.match?(/mingw/) } do
|
|
58
|
+
gem "chef-ruby-shadow", "~> 3.0.0", platforms: :ruby
|
|
51
59
|
end
|
|
52
60
|
end
|
|
53
61
|
|
|
@@ -60,16 +68,10 @@ group(:development, :test) do
|
|
|
60
68
|
gem "rake", ">= 12.3.3"
|
|
61
69
|
gem "rspec"
|
|
62
70
|
gem "webmock"
|
|
63
|
-
gem "crack", "
|
|
71
|
+
gem "crack", "~> 1.0.1"
|
|
64
72
|
gem "fauxhai-ng" # for chef-utils gem
|
|
65
73
|
end
|
|
66
74
|
|
|
67
|
-
gem "chefstyle"
|
|
68
|
-
# group(:chefstyle) do
|
|
69
|
-
# # for testing new chefstyle rules
|
|
70
|
-
# gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "main"
|
|
71
|
-
# end
|
|
72
|
-
|
|
73
75
|
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
|
74
76
|
|
|
75
77
|
# If you want to load debugging tools into the bundle exec sandbox,
|
data/README.md
CHANGED
|
@@ -44,9 +44,10 @@ To learn more about our monthly feature releases and yearly major releases, see
|
|
|
44
44
|
|
|
45
45
|
We'd love to have your help developing Chef Infra. See our [Contributing Document](./CONTRIBUTING.md) for more information on getting started.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
### Community PR Reviews
|
|
48
|
+
Want to raise, review, and help merge a PR with the community and the engineering staff? Please see: [Community Pr Review](./docs/dev/how_to/community_pr_review_checklist.md)
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
## License
|
|
50
51
|
|
|
51
52
|
```
|
|
52
53
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -61,3 +62,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
61
62
|
See the License for the specific language governing permissions and
|
|
62
63
|
limitations under the License.
|
|
63
64
|
```
|
|
65
|
+
|
|
66
|
+
# Copyright
|
|
67
|
+
See [COPYRIGHT.md](./COPYRIGHT.md).
|
data/Rakefile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
|
3
3
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
|
4
|
-
# Copyright
|
|
4
|
+
# Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -25,7 +25,6 @@ begin
|
|
|
25
25
|
require_relative "tasks/dependencies"
|
|
26
26
|
require_relative "tasks/docs"
|
|
27
27
|
require_relative "tasks/spellcheck"
|
|
28
|
-
require_relative "tasks/bundle"
|
|
29
28
|
require_relative "chef-utils/lib/chef-utils/dist" unless defined?(ChefUtils::Dist)
|
|
30
29
|
rescue LoadError => e
|
|
31
30
|
puts "Skipping missing rake dep: #{e}"
|
|
@@ -100,12 +99,18 @@ task :register_eventlog do
|
|
|
100
99
|
end
|
|
101
100
|
end
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
desc "Check Linting and code style."
|
|
103
|
+
task :style do
|
|
105
104
|
require "rubocop/rake_task"
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
require "cookstyle/chefstyle"
|
|
106
|
+
|
|
107
|
+
if RbConfig::CONFIG["host_os"] =~ /mswin|mingw|cygwin/
|
|
108
|
+
# Windows-specific command, rubocop erroneously reports the CRLF in each file which is removed when your PR is uploaded to GitHub.
|
|
109
|
+
# This is a workaround to ignore the CRLF from the files before running cookstyle.
|
|
110
|
+
sh "cookstyle --chefstyle -c .rubocop.yml --except Layout/EndOfLine"
|
|
111
|
+
else
|
|
112
|
+
sh "cookstyle --chefstyle -c .rubocop.yml"
|
|
108
113
|
end
|
|
109
114
|
rescue LoadError
|
|
110
|
-
puts "
|
|
115
|
+
puts "Rubocop or Cookstyle gems are not installed. bundle install first to make sure all dependencies are installed."
|
|
111
116
|
end
|
|
@@ -15,7 +15,7 @@ gemspec.add_dependency "wmi-lite", "~> 1.0"
|
|
|
15
15
|
gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
|
|
16
16
|
gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
|
|
17
17
|
gemspec.add_dependency "win32-certstore", "~> 0.6.15" # 0.5+ required for specifying user vs. system store
|
|
18
|
-
gemspec.add_dependency "chef-powershell", "~> 18.6.
|
|
18
|
+
gemspec.add_dependency "chef-powershell", "~> 18.6.6" # The guts of the powershell_exec code have been moved to its own gem, chef-powershell. It's part of the chef-powershell-shim repo.
|
|
19
19
|
|
|
20
20
|
gemspec.extensions << "ext/win32-eventlog/Rakefile"
|
|
21
21
|
gemspec.files += Dir.glob("{distro,ext}/**/*")
|
data/chef.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# on Windows, the directory location starts with "(eval at " because it's
|
|
2
2
|
# being evaled in
|
|
3
|
-
file_directory = File.dirname(__FILE__).gsub(
|
|
3
|
+
file_directory = File.dirname(__FILE__).gsub("(eval at ", "")
|
|
4
4
|
$:.unshift(File.join(file_directory, "lib"))
|
|
5
5
|
vs_path = File.expand_path("chef-utils/lib/chef-utils/version_string.rb", __dir__)
|
|
6
6
|
|
|
@@ -33,42 +33,39 @@ Gem::Specification.new do |s|
|
|
|
33
33
|
|
|
34
34
|
s.add_dependency "chef-config", "= #{Chef::VERSION}"
|
|
35
35
|
s.add_dependency "chef-utils", "= #{Chef::VERSION}"
|
|
36
|
-
s.add_dependency "train-core", "~> 3.13", ">= 3.13.4"
|
|
37
|
-
s.add_dependency "train-winrm", "
|
|
36
|
+
s.add_dependency "train-core", "~> 3.13", ">= 3.13.4" # Updated to be compatible with InSpec 7
|
|
37
|
+
s.add_dependency "train-winrm", ">= 0.2.17"
|
|
38
38
|
s.add_dependency "train-rest", ">= 0.4.1" # target mode with rest APIs
|
|
39
39
|
|
|
40
40
|
s.add_dependency "license-acceptance", ">= 1.0.5", "< 3"
|
|
41
41
|
s.add_dependency "mixlib-cli", ">= 2.1.1", "< 3.0"
|
|
42
|
-
s.add_dependency "mixlib-log", ">= 2.0.3", "<
|
|
42
|
+
s.add_dependency "mixlib-log", ">= 2.0.3", "< 4.0"
|
|
43
43
|
s.add_dependency "mixlib-authentication", ">= 2.1", "< 4"
|
|
44
|
-
s.add_dependency "mixlib-shellout", "
|
|
44
|
+
s.add_dependency "mixlib-shellout", "~> 3.3.8"
|
|
45
45
|
s.add_dependency "mixlib-archive", ">= 0.4", "< 2.0"
|
|
46
|
-
s.add_dependency "ohai", "~>
|
|
46
|
+
s.add_dependency "ohai", "~> 19.0"
|
|
47
|
+
s.add_dependency "inspec-core", "~> 7.0.95"
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
if RUBY_PLATFORM.include?("aix") || ENV["GENERATE_AIX"] == "true"
|
|
50
|
-
s.add_dependency "inspec-core", ">= 5", "<= 5.22.80"
|
|
51
|
-
else
|
|
52
|
-
s.add_dependency "inspec-core", ">= 5", "< 6"
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
s.add_dependency "ffi", ">= 1.15.5", "<= 1.16.3"
|
|
49
|
+
s.add_dependency "ffi", ">= 1.15.5", "< 1.18.0"
|
|
56
50
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
|
57
51
|
s.add_dependency "net-sftp", ">= 2.1.2", "< 5.0" # remote_file resource
|
|
58
52
|
s.add_dependency "net-ftp" # remote_file resource
|
|
53
|
+
s.add_dependency "ed25519", "~> 1.2" # ssh-ed25519 support for target mode
|
|
54
|
+
s.add_dependency "bcrypt_pbkdf", "~> 1.0" # ssh-ed25519 support for target mode
|
|
59
55
|
s.add_dependency "erubis", "~> 2.7" # template resource / cookbook syntax check
|
|
60
|
-
s.add_dependency "diff-lcs", "
|
|
56
|
+
s.add_dependency "diff-lcs", "~> 1.6.0" # Used in lib/chef/util/diff
|
|
61
57
|
s.add_dependency "ffi-libarchive", "~> 1.0", ">= 1.0.3" # archive_file resource
|
|
62
|
-
s.add_dependency "chef-zero", "
|
|
58
|
+
s.add_dependency "chef-zero", "~> 15.1.0"
|
|
63
59
|
s.add_dependency "chef-vault" # chef-vault resources and helpers
|
|
64
60
|
|
|
65
|
-
s.add_dependency "plist", "~> 3.2" # launchd, dscl/mac user, macos_userdefaults,
|
|
61
|
+
s.add_dependency "plist", "~> 3.2" # launchd, dscl/mac user, macos_userdefaults, and plist resources
|
|
66
62
|
s.add_dependency "iniparse", "~> 1.4" # systemd_unit resource
|
|
67
63
|
s.add_dependency "addressable"
|
|
64
|
+
s.add_dependency "syslog"
|
|
65
|
+
s.add_dependency "csv", "~> 3.3.5" # really needs to come from inspec?
|
|
68
66
|
s.add_dependency "syslog-logger", "~> 1.6"
|
|
69
|
-
s.add_dependency "
|
|
70
|
-
s.add_dependency "
|
|
71
|
-
s.add_dependency "uri", "~> 1.0.3" # This is used by net-http. We are forcing a version to get past a CVE in 1.0.2
|
|
67
|
+
s.add_dependency "unf_ext", "~> 0.0.9.1" # older platforms
|
|
68
|
+
s.add_dependency "uri", "~> 1.0.4" # CVE-2025-61594 fixed in >= 1.0.4
|
|
72
69
|
s.add_dependency "corefoundation", "~> 0.3.4" # macos_userdefaults resource
|
|
73
70
|
|
|
74
71
|
s.add_dependency "proxifier2", "~> 1.1"
|
|
@@ -76,6 +73,7 @@ Gem::Specification.new do |s|
|
|
|
76
73
|
s.add_dependency "aws-sdk-s3", "~> 1.91" # s3 recipe-url support
|
|
77
74
|
s.add_dependency "aws-sdk-secretsmanager", "~> 1.46"
|
|
78
75
|
s.add_dependency "vault", "~> 0.18.2" # hashi vault official client gem
|
|
76
|
+
s.add_dependency "chef-licensing", "~> 1.3"
|
|
79
77
|
|
|
80
78
|
s.bindir = "bin"
|
|
81
79
|
s.executables = %w{ }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -189,6 +189,8 @@ class Chef
|
|
|
189
189
|
# (see EventDispatch::Base#)
|
|
190
190
|
#
|
|
191
191
|
def resource_skipped(resource, action, conditional)
|
|
192
|
+
return if current_record.nil?
|
|
193
|
+
|
|
192
194
|
current_record.status = :skipped
|
|
193
195
|
current_record.conditional = conditional
|
|
194
196
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef/api_client.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
|
3
3
|
# Author:: Nuo Yan (<nuo@chef.io>)
|
|
4
|
-
# Copyright:: Copyright (c)
|
|
4
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef/api_client_v1.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
|
3
3
|
# Author:: Nuo Yan (<nuo@chef.io>)
|
|
4
|
-
# Copyright:: Copyright (c)
|
|
4
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -29,9 +29,12 @@ require_relative "../providers"
|
|
|
29
29
|
require_relative "../resources"
|
|
30
30
|
require "chef-utils/dist" unless defined?(ChefUtils::Dist)
|
|
31
31
|
require "license_acceptance/cli_flags/mixlib_cli"
|
|
32
|
+
require "chef-licensing/cli_flags/mixlib_cli"
|
|
33
|
+
require_relative "../licensing"
|
|
32
34
|
|
|
33
35
|
class Chef::Application::Apply < Chef::Application
|
|
34
36
|
include LicenseAcceptance::CLIFlags::MixlibCLI
|
|
37
|
+
include ChefLicensing::CLIFlags::MixlibCLI
|
|
35
38
|
|
|
36
39
|
banner "Usage: #{ChefUtils::Dist::Apply::EXEC} [RECIPE_FILE | -e RECIPE_TEXT | -s] [OPTIONS]"
|
|
37
40
|
|
|
@@ -75,7 +78,7 @@ class Chef::Application::Apply < Chef::Application
|
|
|
75
78
|
short: "-l LEVEL",
|
|
76
79
|
long: "--log_level LEVEL",
|
|
77
80
|
description: "Set the log level (trace, debug, info, warn, error, fatal).",
|
|
78
|
-
proc: lambda
|
|
81
|
+
proc: lambda(&:to_sym)
|
|
79
82
|
|
|
80
83
|
option :log_location_cli,
|
|
81
84
|
short: "-L LOGLOCATION",
|
|
@@ -94,8 +97,7 @@ class Chef::Application::Apply < Chef::Application
|
|
|
94
97
|
description: "Show this help message.",
|
|
95
98
|
on: :tail,
|
|
96
99
|
boolean: true,
|
|
97
|
-
|
|
98
|
-
exit: 0
|
|
100
|
+
proc: proc { print_help }
|
|
99
101
|
|
|
100
102
|
option :version,
|
|
101
103
|
short: "-v",
|
|
@@ -134,8 +136,32 @@ class Chef::Application::Apply < Chef::Application
|
|
|
134
136
|
description: "Only run the bare minimum Ohai plugins #{ChefUtils::Dist::Infra::PRODUCT} needs to function.",
|
|
135
137
|
boolean: true
|
|
136
138
|
|
|
139
|
+
if ChefUtils::Dist::Apply::EXEC == "chef-apply"
|
|
140
|
+
option :license_add,
|
|
141
|
+
long: "--license-add",
|
|
142
|
+
description: "Add a license key to the license pool.",
|
|
143
|
+
boolean: true,
|
|
144
|
+
proc: lambda { |v| Chef::Licensing.license_add },
|
|
145
|
+
exit: 0
|
|
146
|
+
|
|
147
|
+
option :license_list,
|
|
148
|
+
long: "--license-list",
|
|
149
|
+
description: "List all license keys in the license pool.",
|
|
150
|
+
boolean: true,
|
|
151
|
+
proc: lambda { |v| Chef::Licensing.license_list },
|
|
152
|
+
exit: 0
|
|
153
|
+
end
|
|
154
|
+
|
|
137
155
|
attr_reader :json_attribs
|
|
138
156
|
|
|
157
|
+
def self.print_help
|
|
158
|
+
instance = new
|
|
159
|
+
instance.parse_options([])
|
|
160
|
+
puts instance.opt_parser
|
|
161
|
+
puts Chef::Licensing.licensing_help if ChefUtils::Dist::Apply::EXEC == "chef-apply"
|
|
162
|
+
exit 0
|
|
163
|
+
end
|
|
164
|
+
|
|
139
165
|
def initialize
|
|
140
166
|
super
|
|
141
167
|
end
|
|
@@ -228,6 +254,7 @@ class Chef::Application::Apply < Chef::Application
|
|
|
228
254
|
end
|
|
229
255
|
|
|
230
256
|
def run_application
|
|
257
|
+
Chef::Licensing.check_software_entitlement! if ChefUtils::Dist::Apply::EXEC == "chef-apply"
|
|
231
258
|
parse_options
|
|
232
259
|
run_chef_recipe
|
|
233
260
|
Chef::Application.exit! "Exiting", 0
|
|
@@ -242,7 +269,7 @@ class Chef::Application::Apply < Chef::Application
|
|
|
242
269
|
def run(enforce_license: false)
|
|
243
270
|
reconfigure
|
|
244
271
|
check_license_acceptance if enforce_license
|
|
272
|
+
Chef::Licensing.fetch_and_persist if ChefUtils::Dist::Apply::EXEC == "chef-apply"
|
|
245
273
|
run_application
|
|
246
274
|
end
|
|
247
|
-
|
|
248
275
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -24,7 +24,9 @@ require "chef-utils/dist" unless defined?(ChefUtils::Dist)
|
|
|
24
24
|
require_relative "../daemon"
|
|
25
25
|
require "chef-config/mixin/dot_d"
|
|
26
26
|
require "license_acceptance/cli_flags/mixlib_cli"
|
|
27
|
+
require "chef-licensing/cli_flags/mixlib_cli"
|
|
27
28
|
require "chef/monkey_patches/net-http"
|
|
29
|
+
require_relative "../licensing"
|
|
28
30
|
|
|
29
31
|
module Mixlib
|
|
30
32
|
autoload :Archive, "mixlib/archive"
|
|
@@ -45,6 +47,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
45
47
|
include Chef::Mixin::ShellOut
|
|
46
48
|
include ChefConfig::Mixin::DotD
|
|
47
49
|
include LicenseAcceptance::CLIFlags::MixlibCLI
|
|
50
|
+
include ChefLicensing::CLIFlags::MixlibCLI
|
|
48
51
|
|
|
49
52
|
# Mimic self_pipe sleep from Unicorn to capture signals safely
|
|
50
53
|
SELF_PIPE = [] # rubocop:disable Style/MutableConstant
|
|
@@ -96,7 +99,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
96
99
|
short: "-l LEVEL",
|
|
97
100
|
long: "--log_level LEVEL",
|
|
98
101
|
description: "Set the log level (auto, trace, debug, info, warn, error, fatal).",
|
|
99
|
-
proc: lambda
|
|
102
|
+
proc: lambda(&:to_sym)
|
|
100
103
|
|
|
101
104
|
option :log_location_cli,
|
|
102
105
|
short: "-L LOGLOCATION",
|
|
@@ -115,8 +118,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
115
118
|
description: "Show this help message.",
|
|
116
119
|
on: :tail,
|
|
117
120
|
boolean: true,
|
|
118
|
-
|
|
119
|
-
exit: 0
|
|
121
|
+
proc: proc { print_help }
|
|
120
122
|
|
|
121
123
|
option :user,
|
|
122
124
|
short: "-u USER",
|
|
@@ -139,7 +141,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
139
141
|
short: "-i SECONDS",
|
|
140
142
|
long: "--interval SECONDS",
|
|
141
143
|
description: "Run #{ChefUtils::Dist::Infra::PRODUCT} periodically, in seconds.",
|
|
142
|
-
proc: lambda
|
|
144
|
+
proc: lambda(&:to_i)
|
|
143
145
|
|
|
144
146
|
option :json_attribs,
|
|
145
147
|
short: "-j JSON_ATTRIBS",
|
|
@@ -157,7 +159,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
157
159
|
short: "-s SECONDS",
|
|
158
160
|
long: "--splay SECONDS",
|
|
159
161
|
description: "The splay time for running at intervals, in seconds.",
|
|
160
|
-
proc: lambda
|
|
162
|
+
proc: lambda(&:to_i)
|
|
161
163
|
|
|
162
164
|
option :environment,
|
|
163
165
|
short: "-E ENVIRONMENT",
|
|
@@ -189,7 +191,7 @@ class Chef::Application::Base < Chef::Application
|
|
|
189
191
|
option :run_lock_timeout,
|
|
190
192
|
long: "--run-lock-timeout SECONDS",
|
|
191
193
|
description: "Set maximum duration to wait for another client run to finish, default is indefinitely.",
|
|
192
|
-
proc: lambda
|
|
194
|
+
proc: lambda(&:to_i)
|
|
193
195
|
|
|
194
196
|
option :version,
|
|
195
197
|
short: "-v",
|
|
@@ -314,11 +316,35 @@ class Chef::Application::Base < Chef::Application
|
|
|
314
316
|
end
|
|
315
317
|
}
|
|
316
318
|
|
|
319
|
+
if ChefUtils::Dist::Infra::EXEC == "chef"
|
|
320
|
+
option :license_add,
|
|
321
|
+
long: "--license-add",
|
|
322
|
+
description: "Add a license key to the license pool.",
|
|
323
|
+
boolean: true,
|
|
324
|
+
proc: lambda { |v| Chef::Licensing.license_add },
|
|
325
|
+
exit: 0
|
|
326
|
+
|
|
327
|
+
option :license_list,
|
|
328
|
+
long: "--license-list",
|
|
329
|
+
description: "List all license keys in the license pool.",
|
|
330
|
+
boolean: true,
|
|
331
|
+
proc: lambda { |v| Chef::Licensing.license_list },
|
|
332
|
+
exit: 0
|
|
333
|
+
end
|
|
334
|
+
|
|
317
335
|
IMMEDIATE_RUN_SIGNAL = "1".freeze
|
|
318
336
|
RECONFIGURE_SIGNAL = "H".freeze
|
|
319
337
|
|
|
320
338
|
attr_reader :chef_client_json
|
|
321
339
|
|
|
340
|
+
def self.print_help
|
|
341
|
+
instance = new
|
|
342
|
+
instance.parse_options([])
|
|
343
|
+
puts instance.opt_parser
|
|
344
|
+
puts Chef::Licensing.licensing_help if ChefUtils::Dist::Infra::EXEC == "chef"
|
|
345
|
+
exit 0
|
|
346
|
+
end
|
|
347
|
+
|
|
322
348
|
def setup_application
|
|
323
349
|
Chef::Daemon.change_privilege
|
|
324
350
|
end
|
|
@@ -344,6 +370,11 @@ class Chef::Application::Base < Chef::Application
|
|
|
344
370
|
|
|
345
371
|
# Run the chef client, optionally daemonizing or looping at intervals.
|
|
346
372
|
def run_application
|
|
373
|
+
if ENV["TEST_KITCHEN"]
|
|
374
|
+
puts "Temporarily bypassing licensing check in Kitchen"
|
|
375
|
+
else
|
|
376
|
+
Chef::Licensing.check_software_entitlement! if ChefUtils::Dist::Infra::EXEC == "chef"
|
|
377
|
+
end
|
|
347
378
|
if Chef::Config[:version]
|
|
348
379
|
puts "#{ChefUtils::Dist::Infra::PRODUCT} version: #{::Chef::VERSION}"
|
|
349
380
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Author:: AJ Christensen (<aj@chef.io)
|
|
3
3
|
# Author:: Christopher Brown (<cb@chef.io>)
|
|
4
4
|
# Author:: Mark Mzyk (mmzyk@chef.io)
|
|
5
|
-
# Copyright:: Copyright (c)
|
|
5
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
6
6
|
# License:: Apache License, Version 2.0
|
|
7
7
|
#
|
|
8
8
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -40,6 +40,10 @@ class Chef::Application::Client < Chef::Application::Base
|
|
|
40
40
|
long: "--config CONFIG",
|
|
41
41
|
description: "The configuration file to use."
|
|
42
42
|
|
|
43
|
+
option :credentials,
|
|
44
|
+
long: "--credentials CREDENTIALS",
|
|
45
|
+
description: "Credentials file to use. Default: ~/.chef/credentials"
|
|
46
|
+
|
|
43
47
|
unless ChefUtils.windows?
|
|
44
48
|
option :daemonize,
|
|
45
49
|
short: "-d [WAIT]",
|
|
@@ -116,6 +120,8 @@ class Chef::Application::Client < Chef::Application::Base
|
|
|
116
120
|
Chef::Config.chef_zero.port = config[:chef_zero_port] if config[:chef_zero_port]
|
|
117
121
|
|
|
118
122
|
if config[:target] || Chef::Config.target
|
|
123
|
+
require "ed25519" # required for net-ssh to support ed25519 keys
|
|
124
|
+
|
|
119
125
|
Chef::Config.target_mode.host = config[:target] || Chef::Config.target
|
|
120
126
|
if URI.parse(Chef::Config.target_mode.host).scheme
|
|
121
127
|
train_config = Train.unpack_target_from_uri(Chef::Config.target_mode.host)
|
|
@@ -125,6 +131,14 @@ class Chef::Application::Client < Chef::Application::Base
|
|
|
125
131
|
Chef::Config.node_name = Chef::Config.target_mode.host unless Chef::Config.node_name
|
|
126
132
|
end
|
|
127
133
|
|
|
134
|
+
if config[:credentials]
|
|
135
|
+
unless File.exist?(config[:credentials])
|
|
136
|
+
Chef::Application.fatal!("credentials file #{config[:credentials]} not found")
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
Chef::Config.credentials = config[:credentials]
|
|
140
|
+
end
|
|
141
|
+
|
|
128
142
|
if Chef::Config[:daemonize]
|
|
129
143
|
Chef::Config[:interval] ||= 1800
|
|
130
144
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Steven Murawski (<smurawski@chef.io>)
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -38,6 +38,8 @@ class Chef
|
|
|
38
38
|
# 42 was used by audit mode and should not be reused
|
|
39
39
|
CONFIG_FAILURE: 43,
|
|
40
40
|
CLIENT_UPGRADED: 213,
|
|
41
|
+
LICENSE_NOT_ENTITLED: 173,
|
|
42
|
+
LICENSE_NOT_SET: 174,
|
|
41
43
|
}.freeze
|
|
42
44
|
|
|
43
45
|
DEPRECATED_RFC_062_EXIT_CODES = {
|
|
@@ -141,7 +143,7 @@ class Chef
|
|
|
141
143
|
def non_standard_exit_code_warning(exit_code)
|
|
142
144
|
"#{ChefUtils::Dist::Infra::CLIENT} attempted to exit with a non-standard exit code of #{exit_code}." \
|
|
143
145
|
" The #{ChefUtils::Dist::Infra::PRODUCT} Exit Codes design document (https://github.com/chef/chef/blob/main/docs/dev/design_documents/client_exit_codes.md)" \
|
|
144
|
-
" defines the exit codes that should be used with #{ChefUtils::Dist::Infra::CLIENT}. Chef::Application::ExitCode defines"
|
|
146
|
+
" defines the exit codes that should be used with #{ChefUtils::Dist::Infra::CLIENT}. Chef::Application::ExitCode defines" \
|
|
145
147
|
" valid exit codes Non-standard exit codes are redefined as GENERIC_FAILURE."
|
|
146
148
|
end
|
|
147
149
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: AJ Christensen (<aj@chef.io>)
|
|
3
3
|
# Author:: Mark Mzyk (mmzyk@chef.io)
|
|
4
|
-
# Copyright:: Copyright (c)
|
|
4
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef/application.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: AJ Christensen (<aj@chef.io>)
|
|
3
3
|
# Author:: Mark Mzyk (mmzyk@chef.io)
|
|
4
|
-
# Copyright:: Copyright (c)
|
|
4
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
# License:: Apache License, Version 2.0
|
|
6
6
|
#
|
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -28,6 +28,9 @@ require "tmpdir" unless defined?(Dir.mktmpdir)
|
|
|
28
28
|
require "rbconfig" unless defined?(RbConfig)
|
|
29
29
|
require_relative "application/exit_code"
|
|
30
30
|
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
|
31
|
+
require_relative "licensing"
|
|
32
|
+
require_relative "context"
|
|
33
|
+
|
|
31
34
|
module LicenseAcceptance
|
|
32
35
|
autoload :Acceptor, "license_acceptance/acceptor"
|
|
33
36
|
end
|
|
@@ -64,6 +67,8 @@ class Chef
|
|
|
64
67
|
reconfigure
|
|
65
68
|
setup_application
|
|
66
69
|
check_license_acceptance if enforce_license
|
|
70
|
+
Context.switch_to_workstation_entitlement if Context.test_kitchen_context?
|
|
71
|
+
Chef::Licensing.fetch_and_persist if ChefUtils::Dist::Infra::EXEC == "chef"
|
|
67
72
|
run_application
|
|
68
73
|
end
|
|
69
74
|
|
data/lib/chef/chef_class.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Lamont Granquist (<lamont@chef.io>)
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: John Keiser (<jkeiser@chef.io>)
|
|
3
|
-
# Copyright:: Copyright (c)
|
|
3
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
4
4
|
# License:: Apache License, Version 2.0
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|