chef 18.10.17 → 19.2.12
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 -18
- data/README.md +6 -2
- data/Rakefile +1 -2
- data/chef-universal-mingw-ucrt.gemspec +1 -1
- data/chef.gemspec +17 -19
- 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 +30 -3
- data/lib/chef/application/base.rb +34 -3
- data/lib/chef/application/client.rb +15 -1
- data/lib/chef/application/exit_code.rb +3 -1
- 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 +7 -6
- 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 +2 -2
- 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 +1 -1
- 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 +13 -3
- data/lib/chef/compliance/default_attributes.rb +1 -1
- data/lib/chef/compliance/fetcher/chef_server.rb +1 -1
- 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/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 +2 -2
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +3 -2
- data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +3 -2
- 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 +1 -1
- 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 +1 -1
- 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 +10 -10
- 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 +1 -1
- 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 +1 -1
- data/lib/chef/mixin/proxified_socket.rb +1 -1
- data/lib/chef/mixin/securable.rb +1 -1
- data/lib/chef/mixin/shell_out.rb +1 -1
- data/lib/chef/mixin/subclass_directive.rb +1 -1
- data/lib/chef/mixin/template.rb +1 -1
- 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 +1 -1
- 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 +10 -11
- 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 +3 -3
- 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 +18 -18
- data/lib/chef/provider/dsc_resource.rb +1 -1
- 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 +10 -10
- 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 +3 -3
- 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 +4 -4
- 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 +3 -3
- 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 +1 -1
- 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 +19 -7
- 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 +1 -1
- data/lib/chef/provider/package/windows/msi.rb +1 -1
- 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 +1 -1
- 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 +85 -85
- 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 +8 -8
- 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 +1 -1
- 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 +2 -2
- 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 +156 -11
- data/lib/chef/resource/action_class.rb +1 -1
- data/lib/chef/resource/alternatives.rb +44 -43
- data/lib/chef/resource/apt_package.rb +38 -33
- data/lib/chef/resource/apt_preference.rb +25 -24
- data/lib/chef/resource/apt_repository.rb +16 -11
- data/lib/chef/resource/apt_update.rb +5 -4
- data/lib/chef/resource/archive_file.rb +21 -21
- data/lib/chef/resource/bash.rb +132 -131
- data/lib/chef/resource/batch.rb +1 -1
- data/lib/chef/resource/bff_package.rb +18 -17
- data/lib/chef/resource/breakpoint.rb +46 -45
- data/lib/chef/resource/build_essential.rb +1 -1
- data/lib/chef/resource/cab_package.rb +23 -23
- data/lib/chef/resource/chef_client_config.rb +73 -72
- data/lib/chef/resource/chef_client_cron.rb +21 -19
- data/lib/chef/resource/chef_client_hab_ca_cert.rb +141 -0
- data/lib/chef/resource/chef_client_launchd.rb +6 -2
- data/lib/chef/resource/chef_client_scheduled_task.rb +35 -32
- data/lib/chef/resource/chef_client_systemd_timer.rb +21 -18
- data/lib/chef/resource/chef_client_trusted_certificate.rb +29 -29
- data/lib/chef/resource/chef_gem.rb +1 -1
- data/lib/chef/resource/chef_handler.rb +108 -108
- 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 +15 -15
- data/lib/chef/resource/chocolatey_feature.rb +2 -2
- data/lib/chef/resource/chocolatey_installer.rb +31 -46
- data/lib/chef/resource/chocolatey_package.rb +1 -1
- data/lib/chef/resource/chocolatey_source.rb +16 -16
- 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 -1
- data/lib/chef/resource/cron/cron.rb +72 -71
- 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 +3 -2
- data/lib/chef/resource/directory.rb +4 -3
- 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 +9 -6
- 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 +33 -30
- data/lib/chef/resource/habitat/_habitat_shared.rb +1 -1
- data/lib/chef/resource/habitat/habitat_package.rb +83 -81
- data/lib/chef/resource/habitat/habitat_sup.rb +96 -95
- data/lib/chef/resource/habitat/habitat_sup_systemd.rb +14 -13
- data/lib/chef/resource/habitat/habitat_sup_windows.rb +5 -4
- data/lib/chef/resource/habitat_config.rb +37 -23
- data/lib/chef/resource/habitat_install.rb +22 -22
- data/lib/chef/resource/habitat_service.rb +9 -5
- data/lib/chef/resource/habitat_user_toml.rb +12 -12
- data/lib/chef/resource/helpers/cron_validations.rb +1 -1
- data/lib/chef/resource/helpers/path_helpers.rb +54 -0
- data/lib/chef/resource/homebrew_cask.rb +1 -1
- data/lib/chef/resource/homebrew_package.rb +21 -21
- data/lib/chef/resource/homebrew_tap.rb +10 -2
- data/lib/chef/resource/homebrew_update.rb +1 -1
- data/lib/chef/resource/hostname.rb +14 -11
- data/lib/chef/resource/http_request.rb +5 -4
- data/lib/chef/resource/ifconfig.rb +36 -35
- data/lib/chef/resource/inspec_input.rb +42 -39
- data/lib/chef/resource/inspec_waiver.rb +66 -65
- data/lib/chef/resource/inspec_waiver_file_entry.rb +28 -27
- data/lib/chef/resource/ips_package.rb +4 -3
- data/lib/chef/resource/kernel_module.rb +4 -3
- data/lib/chef/resource/ksh.rb +3 -2
- data/lib/chef/resource/launchd.rb +1 -1
- data/lib/chef/resource/link.rb +4 -3
- data/lib/chef/resource/locale.rb +11 -10
- data/lib/chef/resource/log.rb +3 -1
- 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 +33 -33
- data/lib/chef/resource/mount.rb +7 -5
- data/lib/chef/resource/msu_package.rb +2 -2
- data/lib/chef/resource/notify_group.rb +3 -2
- data/lib/chef/resource/ohai.rb +37 -36
- data/lib/chef/resource/ohai_hint.rb +27 -26
- 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 +1 -1
- 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 +16 -16
- data/lib/chef/resource/openssl_x509_request.rb +2 -2
- data/lib/chef/resource/package.rb +4 -3
- data/lib/chef/resource/pacman_package.rb +2 -1
- data/lib/chef/resource/paludis_package.rb +3 -2
- data/lib/chef/resource/perl.rb +3 -2
- data/lib/chef/resource/plist.rb +4 -4
- data/lib/chef/resource/portage_package.rb +3 -2
- data/lib/chef/resource/powershell_package.rb +1 -1
- data/lib/chef/resource/powershell_package_source.rb +11 -11
- data/lib/chef/resource/powershell_script.rb +1 -1
- data/lib/chef/resource/python.rb +3 -2
- data/lib/chef/resource/reboot.rb +3 -2
- data/lib/chef/resource/registry_key.rb +78 -83
- data/lib/chef/resource/remote_directory.rb +3 -2
- data/lib/chef/resource/remote_file.rb +74 -73
- data/lib/chef/resource/resource_notification.rb +1 -1
- data/lib/chef/resource/rhsm_errata.rb +3 -2
- data/lib/chef/resource/rhsm_errata_level.rb +3 -2
- data/lib/chef/resource/rhsm_register.rb +13 -4
- 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 +82 -81
- data/lib/chef/resource/scm/subversion.rb +12 -11
- data/lib/chef/resource/script.rb +4 -2
- 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 +14 -13
- data/lib/chef/resource/selinux_fcontext.rb +23 -22
- data/lib/chef/resource/selinux_install.rb +20 -19
- data/lib/chef/resource/selinux_login.rb +13 -12
- data/lib/chef/resource/selinux_module.rb +20 -19
- data/lib/chef/resource/selinux_permissive.rb +10 -9
- data/lib/chef/resource/selinux_port.rb +17 -16
- data/lib/chef/resource/selinux_state.rb +29 -28
- data/lib/chef/resource/selinux_user.rb +16 -15
- data/lib/chef/resource/service.rb +9 -6
- data/lib/chef/resource/smartos_package.rb +4 -3
- data/lib/chef/resource/snap_package.rb +32 -23
- data/lib/chef/resource/solaris_package.rb +3 -2
- data/lib/chef/resource/ssh_known_hosts_entry.rb +13 -12
- data/lib/chef/resource/sudo.rb +71 -70
- data/lib/chef/resource/swap_file.rb +20 -19
- data/lib/chef/resource/sysctl.rb +49 -48
- data/lib/chef/resource/systemd_unit.rb +42 -39
- data/lib/chef/resource/template.rb +3 -2
- data/lib/chef/resource/timezone.rb +23 -22
- 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 +5 -4
- 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 +8 -7
- data/lib/chef/resource/user_ulimit.rb +25 -24
- data/lib/chef/resource/windows_ad_join.rb +22 -22
- data/lib/chef/resource/windows_audit_policy.rb +35 -35
- data/lib/chef/resource/windows_auto_run.rb +9 -9
- data/lib/chef/resource/windows_certificate.rb +20 -20
- data/lib/chef/resource/windows_defender.rb +23 -23
- data/lib/chef/resource/windows_defender_exclusion.rb +18 -18
- 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_env.rb +6 -6
- data/lib/chef/resource/windows_feature.rb +43 -43
- data/lib/chef/resource/windows_feature_dism.rb +9 -9
- data/lib/chef/resource/windows_feature_powershell.rb +21 -21
- data/lib/chef/resource/windows_firewall_profile.rb +29 -29
- data/lib/chef/resource/windows_firewall_rule.rb +48 -48
- data/lib/chef/resource/windows_font.rb +7 -7
- data/lib/chef/resource/windows_package.rb +59 -59
- data/lib/chef/resource/windows_pagefile.rb +30 -30
- data/lib/chef/resource/windows_path.rb +13 -13
- data/lib/chef/resource/windows_printer.rb +29 -29
- data/lib/chef/resource/windows_printer_port.rb +22 -22
- data/lib/chef/resource/windows_script.rb +1 -1
- data/lib/chef/resource/windows_security_policy.rb +24 -24
- data/lib/chef/resource/windows_service.rb +107 -107
- data/lib/chef/resource/windows_share.rb +17 -17
- data/lib/chef/resource/windows_shortcut.rb +8 -8
- data/lib/chef/resource/windows_task.rb +103 -105
- data/lib/chef/resource/windows_uac.rb +15 -15
- data/lib/chef/resource/windows_update_settings.rb +27 -27
- data/lib/chef/resource/windows_user_privilege.rb +59 -59
- data/lib/chef/resource/windows_workgroup.rb +11 -11
- data/lib/chef/resource/yum_package.rb +5 -4
- data/lib/chef/resource/yum_repository.rb +37 -36
- data/lib/chef/resource/zypper_package.rb +3 -2
- data/lib/chef/resource/zypper_repository.rb +4 -3
- data/lib/chef/resource.rb +11 -3
- 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 +10 -4
- 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 +3 -1
- 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 +1 -1
- 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 -1
- 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 -1
- 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/ext.rb +20 -20
- data/lib/chef/shell/model_wrapper.rb +1 -1
- data/lib/chef/shell/shell_session.rb +2 -2
- 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 +1 -1
- 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 +125 -84
- data/lib/chef/resource/osx_profile.rb +0 -334
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Tim Smith (<tsmith@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
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
6
|
# you may not use this file except in compliance with the License.
|
|
@@ -26,23 +26,23 @@ class Chef
|
|
|
26
26
|
description 'The *windows_uac* resource configures UAC on Windows hosts by setting registry keys at `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System`'
|
|
27
27
|
introduced "15.0"
|
|
28
28
|
examples <<~DOC
|
|
29
|
-
|
|
29
|
+
**Disable UAC prompts for the admin**:
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
```ruby
|
|
32
|
+
windows_uac 'Disable UAC prompts for the admin' do
|
|
33
|
+
enable_uac true
|
|
34
|
+
prompt_on_secure_desktop false
|
|
35
|
+
consent_behavior_admins :no_prompt
|
|
36
|
+
end
|
|
37
|
+
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
**Disable UAC entirely**:
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
```ruby
|
|
42
|
+
windows_uac 'Disable UAC entirely' do
|
|
43
|
+
enable_uac false
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
46
|
DOC
|
|
47
47
|
|
|
48
48
|
# https://docs.microsoft.com/en-us/windows/security/identity-protection/user-account-control/user-account-control-group-policy-and-registry-key-settings#user-account-control-virtualize-file-and-registry-write-failures-to-per-user-locations
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Author:: Tim Smith (tsmith@chef.io)
|
|
5
5
|
#
|
|
6
6
|
# Copyright:: 2014-2017, Sölvi Páll Ásgeirsson.
|
|
7
|
-
# Copyright:: Copyright (c)
|
|
7
|
+
# Copyright:: Copyright (c) 2009-2026 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
8
8
|
#
|
|
9
9
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
10
|
# you may not use this file except in compliance with the License.
|
|
@@ -29,20 +29,20 @@ class Chef
|
|
|
29
29
|
description "Use the **windows_update_settings** resource to manage the various Windows Update patching options."
|
|
30
30
|
introduced "17.3"
|
|
31
31
|
examples <<~DOC
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
32
|
+
**Set Windows Update settings**:
|
|
33
|
+
|
|
34
|
+
```ruby
|
|
35
|
+
windows_update_settings 'Settings to Configure Windows Nodes to automatically receive updates' do
|
|
36
|
+
disable_os_upgrades true
|
|
37
|
+
elevate_non_admins true
|
|
38
|
+
block_windows_update_website true
|
|
39
|
+
automatically_install_minor_updates true
|
|
40
|
+
scheduled_install_day 'Friday'
|
|
41
|
+
scheduled_install_hour 18
|
|
42
|
+
update_other_ms_products true
|
|
43
|
+
action :enable
|
|
44
|
+
end
|
|
45
|
+
```
|
|
46
46
|
DOC
|
|
47
47
|
|
|
48
48
|
# required for the alias to pass validation
|
|
@@ -87,8 +87,8 @@ class Chef
|
|
|
87
87
|
# HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU
|
|
88
88
|
|
|
89
89
|
property :automatic_update_option, [Integer, Symbol], equal_to: UPDATE_OPTIONS.keys, coerce: proc { |x| UPDATE_OPTIONS.key(x) || x },
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
default: :download_and_schedule,
|
|
91
|
+
description: "Control what to do when updates are found. This allows you to notify, automatically download and notify to install, automatically download and schedule the install, or let the local admin decide what action to take."
|
|
92
92
|
# options: 2 - notify before download
|
|
93
93
|
# 3 - auto download and notify
|
|
94
94
|
# 4 - auto download and schedule - must also set day and time (below)
|
|
@@ -104,11 +104,11 @@ class Chef
|
|
|
104
104
|
# 1 - yeah, buddy, i want to set my own interval for checking for updates - true
|
|
105
105
|
|
|
106
106
|
property :custom_detection_frequency, Integer, default: 22, description: "If you decided to override the OS default detection frequency, specify your choice here. Valid choices are 0 - 22",
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
callbacks: {
|
|
108
|
+
"should be a valid detection frequency (0-22)" => lambda { |p|
|
|
109
|
+
p.between?(0, 22)
|
|
110
|
+
},
|
|
111
|
+
}
|
|
112
112
|
# a time period of between 0 and 22 hours to check for new updates
|
|
113
113
|
# this is a hex value - convert it from dec to hex
|
|
114
114
|
|
|
@@ -125,11 +125,11 @@ class Chef
|
|
|
125
125
|
# Sunday - Saturday day of the week to install, 1 == sunday
|
|
126
126
|
|
|
127
127
|
property :scheduled_install_hour, Integer, description: "If you chose a scheduled day to install, then choose an hour on that day for you installation",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
callbacks: {
|
|
129
|
+
"should be a valid hour in a 24 hour clock" => lambda { |p|
|
|
130
|
+
p > 0 && p < 25
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
133
|
# options: --- 2-digit number representing an hour of the day, uses a 24-hour clock, 12 == noon, 24 == midnight
|
|
134
134
|
|
|
135
135
|
property :update_other_ms_products, [true, false], default: true, description: "Allows for other Microsoft products to get updates too"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Jared Kauppila (<jared@kauppi.la>)
|
|
3
3
|
# Author:: Vasundhara Jagdale(<vasundhara.jagdale@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
|
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
|
@@ -28,67 +28,67 @@ class Chef
|
|
|
28
28
|
introduced "16.0"
|
|
29
29
|
|
|
30
30
|
examples <<~DOC
|
|
31
|
-
|
|
31
|
+
**Set the SeNetworkLogonRight privilege for the Builtin Administrators and Authenticated Users groups**:
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
The `:set` action will add this privilege for these two groups and remove this privilege from all other groups or users.
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
```ruby
|
|
36
|
+
windows_user_privilege 'Network Logon Rights' do
|
|
37
|
+
privilege 'SeNetworkLogonRight'
|
|
38
|
+
users ['BUILTIN\\Administrators', 'NT AUTHORITY\\Authenticated Users']
|
|
39
|
+
action :set
|
|
40
|
+
end
|
|
41
|
+
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
**Set the SeCreatePagefilePrivilege privilege for the Builtin Guests and Administrator groups**:
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
The `:set` action will add this privilege for these two groups and remove this privilege from all other groups or users.
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
```ruby
|
|
48
|
+
windows_user_privilege 'Create Pagefile' do
|
|
49
|
+
privilege 'SeCreatePagefilePrivilege'
|
|
50
|
+
users ['BUILTIN\\Guests', 'BUILTIN\\Administrators']
|
|
51
|
+
action :set
|
|
52
|
+
end
|
|
53
|
+
```
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
**Add the SeDenyRemoteInteractiveLogonRight privilege to the 'Remote interactive logon' principal**:
|
|
56
56
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
```ruby
|
|
58
|
+
windows_user_privilege 'Remote interactive logon' do
|
|
59
|
+
privilege 'SeDenyRemoteInteractiveLogonRight'
|
|
60
|
+
action :add
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
**Add the SeCreatePageFilePrivilege privilege to the Builtin Guests group**:
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
```ruby
|
|
67
|
+
windows_user_privilege 'Guests add Create Pagefile' do
|
|
68
|
+
principal 'BUILTIN\\Guests'
|
|
69
|
+
privilege 'SeCreatePagefilePrivilege'
|
|
70
|
+
action :add
|
|
71
|
+
end
|
|
72
|
+
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
**Remove the SeCreatePageFilePrivilege privilege from the Builtin Guests group**:
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
```ruby
|
|
77
|
+
windows_user_privilege 'Create Pagefile' do
|
|
78
|
+
privilege 'SeCreatePagefilePrivilege'
|
|
79
|
+
principal 'BUILTIN\\Guests'
|
|
80
|
+
action :remove
|
|
81
|
+
end
|
|
82
|
+
```
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
**Clear the SeDenyNetworkLogonRight privilege from all users**:
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
86
|
+
```ruby
|
|
87
|
+
windows_user_privilege 'Allow any user the Network Logon right' do
|
|
88
|
+
privilege 'SeDenyNetworkLogonRight'
|
|
89
|
+
action :clear
|
|
90
|
+
end
|
|
91
|
+
```
|
|
92
92
|
DOC
|
|
93
93
|
|
|
94
94
|
PRIVILEGE_OPTS = %w{ SeAssignPrimaryTokenPrivilege
|
|
@@ -139,20 +139,20 @@ class Chef
|
|
|
139
139
|
}.freeze
|
|
140
140
|
|
|
141
141
|
property :principal, String,
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
description: "An optional property to add the privilege for given principal. Use only with add and remove action. Principal can either be a user, group, or [special identity](https://docs.microsoft.com/en-us/windows/security/identity-protection/access-control/special-identities).",
|
|
143
|
+
name_property: true
|
|
144
144
|
|
|
145
145
|
property :users, [Array, String],
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
description: "An optional property to set the privilege for the specified users. Use only with `:set` action",
|
|
147
|
+
coerce: proc { |v| Array(v) }
|
|
148
148
|
|
|
149
149
|
property :privilege, [Array, String],
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
150
|
+
description: "One or more privileges to set for principal or users/groups. For more information, see [Microsoft's documentation on what each privilege does](https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/user-rights-assignment).",
|
|
151
|
+
required: true,
|
|
152
|
+
coerce: proc { |v| Array(v) },
|
|
153
|
+
callbacks: {
|
|
154
|
+
"Privilege property restricted to the following values: #{PRIVILEGE_OPTS}" => lambda { |n| (n - PRIVILEGE_OPTS).empty? },
|
|
155
|
+
}, identity: true
|
|
156
156
|
|
|
157
157
|
load_current_value do |new_resource|
|
|
158
158
|
if new_resource.principal && (new_resource.action.include?(:add) || new_resource.action.include?(:remove))
|
|
@@ -27,20 +27,20 @@ class Chef
|
|
|
27
27
|
description "Use the **windows_workgroup** resource to join or change the workgroup of a Windows host."
|
|
28
28
|
introduced "14.5"
|
|
29
29
|
examples <<~DOC
|
|
30
|
-
|
|
30
|
+
**Join a workgroup**:
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
```ruby
|
|
33
|
+
windows_workgroup 'myworkgroup'
|
|
34
|
+
```
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
**Join a workgroup using a specific user**:
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
```ruby
|
|
39
|
+
windows_workgroup 'myworkgroup' do
|
|
40
|
+
user 'Administrator'
|
|
41
|
+
password 'passw0rd'
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
44
|
DOC
|
|
45
45
|
|
|
46
46
|
property :workgroup_name, String,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: AJ Christensen (<aj@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");
|
|
@@ -23,8 +23,9 @@ class Chef
|
|
|
23
23
|
class Resource
|
|
24
24
|
class YumPackage < Chef::Resource::Package
|
|
25
25
|
|
|
26
|
-
provides :yum_package
|
|
26
|
+
provides :yum_package, target_mode: true
|
|
27
27
|
provides :package, platform_family: "fedora_derived"
|
|
28
|
+
target_mode support: :full
|
|
28
29
|
|
|
29
30
|
description "Use the **yum_package** resource to install, upgrade, and remove packages with Yum for the Red Hat and CentOS platforms. The yum_package resource is able to resolve `provides` data for packages much like Yum can do when it is run from the command line. This allows a variety of options for installing packages, like minimum versions, virtual provides, and library names. Note: Support for using file names to install packages (as in `yum_package '/bin/sh'`) is not available because the volume of data required to parse for this is excessive."
|
|
30
31
|
examples <<~DOC
|
|
@@ -109,7 +110,7 @@ class Chef
|
|
|
109
110
|
```
|
|
110
111
|
DOC
|
|
111
112
|
|
|
112
|
-
allowed_actions :install, :upgrade, :remove, :purge, :lock, :unlock
|
|
113
|
+
allowed_actions :install, :upgrade, :remove, :purge, :lock, :unlock, :flush_cache
|
|
113
114
|
|
|
114
115
|
# XXX: the coercions here are due to the provider promiscuously updating the properties on the
|
|
115
116
|
# new_resource which causes immutable modification exceptions when passed an immutable node array.
|
|
@@ -157,7 +158,7 @@ class Chef
|
|
|
157
158
|
description: "The path to the yum binary."
|
|
158
159
|
|
|
159
160
|
property :environment, Hash,
|
|
160
|
-
introduced: "
|
|
161
|
+
introduced: "19.0",
|
|
161
162
|
description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
|
|
162
163
|
default: {}, desired_state: false
|
|
163
164
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Thom May (<thom@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");
|
|
@@ -22,29 +22,30 @@ class Chef
|
|
|
22
22
|
class Resource
|
|
23
23
|
class YumRepository < Chef::Resource
|
|
24
24
|
|
|
25
|
-
provides(:yum_repository) { true }
|
|
25
|
+
provides(:yum_repository, target_mode: true) { true }
|
|
26
|
+
target_mode support: :full
|
|
26
27
|
|
|
27
28
|
description "Use the **yum_repository** resource to manage a Yum repository configuration file located at `/etc/yum.repos.d/repositoryid.repo` on the local machine. This configuration file specifies which repositories to reference, how to handle cached data, etc."
|
|
28
29
|
introduced "12.14"
|
|
29
30
|
examples <<~DOC
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
31
|
+
**Add an internal company repository**:
|
|
32
|
+
|
|
33
|
+
```ruby
|
|
34
|
+
yum_repository 'OurCo' do
|
|
35
|
+
description 'OurCo yum repository'
|
|
36
|
+
mirrorlist 'http://artifacts.ourco.org/mirrorlist?repo=ourco-8&arch=$basearch'
|
|
37
|
+
gpgkey 'http://artifacts.ourco.org/pub/yum/RPM-GPG-KEY-OURCO-8'
|
|
38
|
+
action :create
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Delete a repository**:
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
yum_repository 'CentOS-Media' do
|
|
46
|
+
action :delete
|
|
47
|
+
end
|
|
48
|
+
```
|
|
48
49
|
DOC
|
|
49
50
|
|
|
50
51
|
# http://linux.die.net/man/5/yum.conf as well as
|
|
@@ -67,8 +68,8 @@ class Chef
|
|
|
67
68
|
default: true
|
|
68
69
|
|
|
69
70
|
property :cost, String, regex: /^\d+$/,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
description: "Relative cost of accessing this repository. Useful for weighing one repo's packages as greater/less than any other.",
|
|
72
|
+
validation_message: "The cost property must be a numeric value!"
|
|
72
73
|
|
|
73
74
|
property :description, String,
|
|
74
75
|
description: "Descriptive name for the repository channel and maps to the 'name' parameter in a repository .conf.",
|
|
@@ -99,7 +100,7 @@ class Chef
|
|
|
99
100
|
description: "URL pointing to the ASCII-armored GPG key file for the repository. This is used if Yum needs a public key to verify a package and the required key hasn't been imported into the RPM database. If this option is set, Yum will automatically import the key from the specified URL. Multiple URLs may be specified in the same manner as the baseurl option. If a GPG key is required to install a package from a repository, all keys specified for that repository will be installed.\nMultiple URLs may be specified in the same manner as the baseurl option. If a GPG key is required to install a package from a repository, all keys specified for that repository will be installed."
|
|
100
101
|
|
|
101
102
|
property :http_caching, String, equal_to: %w{packages all none},
|
|
102
|
-
|
|
103
|
+
description: "Determines how upstream HTTP caches are instructed to handle any HTTP downloads that Yum does. This option can take the following values:\n - `all` means all HTTP downloads should be cached\n - `packages` means only RPM package downloads should be cached, but not repository metadata downloads\n - `none` means no HTTP downloads should be cached.\n\nThe default value of `all` is recommended unless you are experiencing caching related issues."
|
|
103
104
|
|
|
104
105
|
property :include_config, String,
|
|
105
106
|
description: "An external configuration file using the format `url://to/some/location`."
|
|
@@ -122,19 +123,19 @@ class Chef
|
|
|
122
123
|
description: "Number of times any attempt to retrieve a file should retry before returning an error. Setting this to `0` makes Yum try forever."
|
|
123
124
|
|
|
124
125
|
property :metadata_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/, /never/],
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
description: "Time (in seconds) after which the metadata will expire. If the current metadata downloaded is less than the value specified, then Yum will not update the metadata against the repository. If you find that Yum is not downloading information on updates as often as you would like lower the value of this option. You can also change from the default of using seconds to using days, hours or minutes by appending a `d`, `h` or `m` respectively. The default is six hours to compliment yum-updates running once per hour. It is also possible to use the word `never`, meaning that the metadata will never expire. Note: When using a metalink file, the metalink must always be newer than the metadata for the repository due to the validation, so this timeout also applies to the metalink file.",
|
|
127
|
+
validation_message: "The metadata_expire property must be a numeric value for time in seconds, the string 'never', or a numeric value appended with with `d`, `h`, or `m`!"
|
|
127
128
|
|
|
128
129
|
property :metalink, String,
|
|
129
130
|
description: "Specifies a URL to a metalink file for the repomd.xml, a list of mirrors for the entire repository are generated by converting the mirrors for the repomd.xml file to a baseurl."
|
|
130
131
|
|
|
131
132
|
property :mirror_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/],
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
description: "Time (in seconds) after which the mirrorlist locally cached will expire. If the current mirrorlist is less than this many seconds old then Yum will not download another copy of the mirrorlist, it has the same extra format as metadata_expire. If you find that Yum is not downloading the mirrorlists as often as you would like lower the value of this option. You can also change from the default of using seconds to using days, hours or minutes by appending a `d`, `h` or `m` respectively.",
|
|
134
|
+
validation_message: "The mirror_expire property must be a numeric value for time in seconds, the string 'never', or a numeric value appended with with `d`, `h`, or `m`!"
|
|
134
135
|
|
|
135
136
|
property :mirrorlist_expire, String, regex: [/^\d+$/, /^\d+[mhd]$/],
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
description: "Specifies the time (in seconds) after which the mirrorlist locally cached will expire. If the current mirrorlist is less than the value specified, then Yum will not download another copy of the mirrorlist. You can also change from the default of using seconds to using days, hours or minutes by appending a `d`, `h` or `m` respectively.",
|
|
138
|
+
validation_message: "The mirrorlist_expire property must be a numeric value for time in seconds, the string 'never', or a numeric value appended with with `d`, `h`, or `m`!"
|
|
138
139
|
|
|
139
140
|
property :mirrorlist, String,
|
|
140
141
|
description: "URL to a file containing a list of baseurls. This can be used instead of or with the baseurl option. Substitution variables, described below, can be used with this option."
|
|
@@ -150,8 +151,8 @@ class Chef
|
|
|
150
151
|
description: "Password to use with the username for basic authentication."
|
|
151
152
|
|
|
152
153
|
property :priority, String, regex: /^(\d?[1-9]|[0-9][0-9])$/,
|
|
153
|
-
|
|
154
|
-
|
|
154
|
+
description: "Assigns a priority to a repository where the priority value is between `1` and `99` inclusive. Priorities are used to enforce ordered protection of repositories. Packages from repositories with a lower priority (higher numerical value) will never be used to upgrade packages that were installed from a repository with a higher priority (lower numerical value). The repositories with the lowest numerical priority number have the highest priority.",
|
|
155
|
+
validation_message: "The priority property must be a numeric value from 1-99!"
|
|
155
156
|
|
|
156
157
|
property :proxy_password, String,
|
|
157
158
|
description: "Password for this proxy."
|
|
@@ -169,9 +170,9 @@ class Chef
|
|
|
169
170
|
description: "Determines whether to report the instance ID when using Amazon Linux AMIs and repositories."
|
|
170
171
|
|
|
171
172
|
property :repositoryid, String, regex: [%r{^[^/]+$}],
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
description: "An optional property to set the repository name if it differs from the resource block's name.",
|
|
174
|
+
validation_message: "repositoryid property cannot contain a forward slash '/'",
|
|
175
|
+
name_property: true
|
|
175
176
|
|
|
176
177
|
property :skip_if_unavailable, [TrueClass, FalseClass],
|
|
177
178
|
description: "Allow yum to continue if this repository cannot be contacted for any reason."
|
|
@@ -195,8 +196,8 @@ class Chef
|
|
|
195
196
|
description: "Enable bandwidth throttling for downloads."
|
|
196
197
|
|
|
197
198
|
property :timeout, String, regex: /^\d+$/,
|
|
198
|
-
|
|
199
|
-
|
|
199
|
+
description: "Number of seconds to wait for a connection before timing out. Defaults to 30 seconds. This may be too short of a time for extremely overloaded sites.",
|
|
200
|
+
validation_message: "The timeout property must be a numeric value!"
|
|
200
201
|
|
|
201
202
|
property :username, String,
|
|
202
203
|
description: "Username to use for basic authentication to a repository."
|
|
@@ -22,8 +22,9 @@ class Chef
|
|
|
22
22
|
class Resource
|
|
23
23
|
class ZypperPackage < Chef::Resource::Package
|
|
24
24
|
|
|
25
|
-
provides :zypper_package
|
|
26
|
-
provides :package, platform_family: "suse"
|
|
25
|
+
provides :zypper_package, target_mode: true
|
|
26
|
+
provides :package, platform_family: "suse", target_mode: true
|
|
27
|
+
target_mode support: :full
|
|
27
28
|
|
|
28
29
|
description "Use the **zypper_package** resource to install, upgrade, and remove packages with Zypper for the SUSE Enterprise and openSUSE platforms."
|
|
29
30
|
examples <<~DOC
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Tim Smith (<tsmith@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");
|
|
@@ -22,8 +22,9 @@ class Chef
|
|
|
22
22
|
class Resource
|
|
23
23
|
class ZypperRepository < Chef::Resource
|
|
24
24
|
|
|
25
|
-
provides(:zypper_repository) { true }
|
|
26
|
-
provides(:zypper_repo) { true } # legacy cookbook compatibility
|
|
25
|
+
provides(:zypper_repository, target_mode: true) { true }
|
|
26
|
+
provides(:zypper_repo, target_mode: true) { true } # legacy cookbook compatibility
|
|
27
|
+
target_mode support: :full
|
|
27
28
|
|
|
28
29
|
description "Use the **zypper_repository** resource to create Zypper package repositories on SUSE Enterprise Linux and openSUSE systems. This resource maintains full compatibility with the **zypper_repository** resource in the existing **zypper** cookbook."
|
|
29
30
|
introduced "13.3"
|
data/lib/chef/resource.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
|
3
3
|
# Author:: Christopher Walters (<cw@chef.io>)
|
|
4
4
|
# Author:: John Keiser (<jkeiser@chef.io)
|
|
5
|
-
# Copyright
|
|
5
|
+
# 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");
|
|
@@ -1219,9 +1219,9 @@ class Chef
|
|
|
1219
1219
|
#
|
|
1220
1220
|
|
|
1221
1221
|
# FORBIDDEN_IVARS do not show up when the resource is converted to JSON (ie. hidden from data_collector and sending to the chef server via #to_json/to_h/as_json/inspect)
|
|
1222
|
-
FORBIDDEN_IVARS = %i{@run_context @logger @not_if @only_if @enclosing_provider @description @introduced @examples @validation_message @deprecated @default_description @skip_docs @executed_by_runner @action_descriptions}.freeze
|
|
1222
|
+
FORBIDDEN_IVARS = %i{@run_context @logger @not_if @only_if @enclosing_provider @description @introduced @examples @validation_message @deprecated @default_description @target_mode @skip_docs @executed_by_runner @action_descriptions}.freeze
|
|
1223
1223
|
# HIDDEN_IVARS do not show up when the resource is displayed to the user as text (ie. in the error inspector output via #to_text)
|
|
1224
|
-
HIDDEN_IVARS = %i{@allowed_actions @resource_name @source_line @run_context @logger @name @not_if @only_if @elapsed_time @enclosing_provider @description @introduced @examples @validation_message @deprecated @default_description @skip_docs @executed_by_runner @action_descriptions}.freeze
|
|
1224
|
+
HIDDEN_IVARS = %i{@allowed_actions @resource_name @source_line @run_context @logger @name @not_if @only_if @elapsed_time @enclosing_provider @description @introduced @examples @validation_message @deprecated @default_description @target_mode @skip_docs @executed_by_runner @action_descriptions}.freeze
|
|
1225
1225
|
|
|
1226
1226
|
include Chef::Mixin::ConvertToClassName
|
|
1227
1227
|
extend Chef::Mixin::ConvertToClassName
|
|
@@ -1491,6 +1491,14 @@ class Chef
|
|
|
1491
1491
|
@default_description
|
|
1492
1492
|
end
|
|
1493
1493
|
|
|
1494
|
+
# Documentation-only keyword
|
|
1495
|
+
def self.target_mode(target_mode = "NOT_PASSED")
|
|
1496
|
+
if target_mode != "NOT_PASSED"
|
|
1497
|
+
@target_mode = target_mode
|
|
1498
|
+
end
|
|
1499
|
+
@target_mode
|
|
1500
|
+
end
|
|
1501
|
+
|
|
1494
1502
|
# Use a partial code fragment. This can be used for code sharing between multiple resources.
|
|
1495
1503
|
#
|
|
1496
1504
|
# Do not wrap the code fragment in a class or module. It also does not support the use of super
|
|
@@ -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:: Tyler Ball (<tball@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:: Tyler Ball (<tball@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");
|