chef 15.4.45-universal-mingw32 → 15.5.9-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -3
- data/Rakefile +5 -3
- data/chef.gemspec +2 -1
- data/ext/win32-eventlog/Rakefile +9 -1
- data/ext/win32-eventlog/{chef-log.man → chef-log.man.erb} +4 -4
- data/lib/chef/application.rb +2 -2
- data/lib/chef/application/client.rb +1 -1
- data/lib/chef/application/knife.rb +1 -0
- data/lib/chef/application/solo.rb +1 -1
- data/lib/chef/chef_class.rb +1 -6
- data/lib/chef/chef_fs.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +2 -2
- 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 +7 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +4 -3
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +3 -3
- 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/nodes_dir.rb +3 -3
- data/lib/chef/chef_fs/knife.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +2 -2
- data/lib/chef/client.rb +4 -5
- data/lib/chef/config.rb +3 -2
- data/lib/chef/cookbook/chefignore.rb +16 -11
- data/lib/chef/cookbook/cookbook_version_loader.rb +1 -1
- data/lib/chef/cookbook/syntax_check.rb +5 -3
- data/lib/chef/cookbook_loader.rb +3 -3
- data/lib/chef/cookbook_uploader.rb +1 -1
- data/lib/chef/data_collector.rb +2 -2
- data/lib/chef/data_collector/run_end_message.rb +1 -0
- data/lib/chef/deprecated.rb +4 -0
- data/lib/chef/dsl/core.rb +1 -1
- data/lib/chef/dsl/platform_introspection.rb +9 -18
- data/lib/chef/event_loggers/windows_eventlog.rb +1 -1
- data/lib/chef/file_content_management/deploy.rb +3 -3
- data/lib/chef/file_content_management/deploy/mv_windows.rb +2 -2
- data/lib/chef/file_content_management/tempfile.rb +1 -1
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +2 -2
- data/lib/chef/http.rb +1 -1
- data/lib/chef/http/socketless_chef_zero_client.rb +1 -1
- data/lib/chef/knife.rb +4 -3
- data/lib/chef/knife/config_get.rb +2 -1
- data/lib/chef/knife/configure.rb +1 -1
- data/lib/chef/knife/cookbook_metadata_from_file.rb +6 -0
- data/lib/chef/knife/core/generic_presenter.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +1 -1
- data/lib/chef/knife/ssh.rb +6 -0
- data/lib/chef/local_mode.rb +1 -1
- data/lib/chef/mash.rb +21 -232
- data/lib/chef/mixin/file_class.rb +2 -2
- data/lib/chef/mixin/lazy_module_include.rb +1 -1
- data/lib/chef/mixin/path_sanity.rb +3 -39
- data/lib/chef/mixin/securable.rb +1 -1
- data/lib/chef/mixin/shell_out.rb +4 -5
- data/lib/chef/mixin/template.rb +1 -1
- data/lib/chef/mixin/user_context.rb +3 -3
- data/lib/chef/mixin/which.rb +10 -38
- data/lib/chef/mixin/windows_architecture_helper.rb +6 -6
- data/lib/chef/mixin/windows_env_helper.rb +5 -5
- data/lib/chef/node/attribute.rb +2 -2
- data/lib/chef/node_map.rb +17 -4
- data/lib/chef/platform/query_helpers.rb +4 -2
- data/lib/chef/platform/rebooter.rb +1 -1
- data/lib/chef/platform/service_helpers.rb +14 -85
- data/lib/chef/provider.rb +2 -0
- data/lib/chef/provider/file.rb +2 -2
- data/lib/chef/provider/ifconfig/redhat.rb +1 -1
- data/lib/chef/provider/link.rb +3 -3
- data/lib/chef/provider/mount/solaris.rb +1 -1
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/registry_key.rb +1 -1
- data/lib/chef/provider/remote_directory.rb +3 -3
- data/lib/chef/provider/remote_file/fetcher.rb +2 -2
- data/lib/chef/provider/remote_file/local_file.rb +1 -1
- data/lib/chef/provider/script.rb +3 -3
- data/lib/chef/provider/service.rb +5 -2
- data/lib/chef/provider/service/arch.rb +1 -1
- data/lib/chef/provider/service/debian.rb +4 -4
- data/lib/chef/provider/service/init.rb +1 -1
- data/lib/chef/provider/service/insserv.rb +4 -4
- data/lib/chef/provider/service/invokercd.rb +4 -4
- data/lib/chef/provider/service/redhat.rb +4 -4
- data/lib/chef/provider/service/systemd.rb +19 -3
- data/lib/chef/provider/service/upstart.rb +3 -3
- data/lib/chef/provider/subversion.rb +1 -1
- data/lib/chef/provider/systemd_unit.rb +26 -2
- data/lib/chef/provider/windows_path.rb +3 -3
- data/lib/chef/provider/windows_task.rb +4 -4
- data/lib/chef/resource.rb +1 -0
- data/lib/chef/resource/bash.rb +2 -0
- data/lib/chef/resource/batch.rb +2 -0
- data/lib/chef/resource/breakpoint.rb +3 -1
- data/lib/chef/resource/build_essential.rb +3 -3
- data/lib/chef/resource/chef_sleep.rb +70 -0
- data/lib/chef/resource/cookbook_file.rb +2 -1
- data/lib/chef/resource/csh.rb +2 -0
- data/lib/chef/resource/directory.rb +2 -0
- data/lib/chef/resource/dmg_package.rb +1 -1
- data/lib/chef/resource/dnf_package.rb +1 -1
- data/lib/chef/resource/execute.rb +2 -0
- data/lib/chef/resource/file.rb +2 -1
- data/lib/chef/resource/git.rb +2 -0
- data/lib/chef/resource/group.rb +1 -1
- data/lib/chef/resource/homebrew_package.rb +1 -1
- data/lib/chef/resource/http_request.rb +2 -0
- data/lib/chef/resource/ifconfig.rb +3 -1
- data/lib/chef/resource/ksh.rb +2 -0
- data/lib/chef/resource/link.rb +4 -2
- data/lib/chef/resource/locale.rb +1 -1
- data/lib/chef/resource/log.rb +2 -0
- data/lib/chef/resource/ohai.rb +2 -0
- data/lib/chef/resource/perl.rb +2 -0
- data/lib/chef/resource/python.rb +2 -0
- data/lib/chef/resource/reboot.rb +2 -0
- data/lib/chef/resource/registry_key.rb +2 -0
- data/lib/chef/resource/remote_directory.rb +3 -2
- data/lib/chef/resource/remote_file.rb +1 -0
- data/lib/chef/resource/ruby.rb +2 -0
- data/lib/chef/resource/ruby_block.rb +2 -0
- data/lib/chef/resource/scm.rb +2 -0
- data/lib/chef/resource/script.rb +2 -0
- data/lib/chef/resource/service.rb +9 -1
- data/lib/chef/resource/solaris_package.rb +1 -1
- data/lib/chef/resource/subversion.rb +2 -0
- data/lib/chef/resource/sudo.rb +1 -1
- data/lib/chef/resource/systemd_unit.rb +1 -0
- data/lib/chef/resource/template.rb +2 -0
- data/lib/chef/resource/user.rb +2 -0
- data/lib/chef/resource/user/aix_user.rb +2 -0
- data/lib/chef/resource/user/linux_user.rb +2 -0
- data/lib/chef/resource/user/pw_user.rb +2 -0
- data/lib/chef/resource/user/solaris_user.rb +2 -0
- data/lib/chef/resource/user/windows_user.rb +2 -0
- data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -0
- data/lib/chef/resource/windows_ad_join.rb +1 -1
- data/lib/chef/resource/windows_env.rb +1 -1
- data/lib/chef/resource/windows_feature.rb +2 -2
- data/lib/chef/resource/windows_feature_powershell.rb +1 -1
- data/lib/chef/resource/windows_firewall_rule.rb +11 -6
- data/lib/chef/resource/windows_script.rb +3 -1
- data/lib/chef/resource/yum_package.rb +1 -1
- data/lib/chef/resource_reporter.rb +1 -1
- data/lib/chef/resources.rb +1 -0
- data/lib/chef/run_context.rb +1 -1
- data/lib/chef/run_lock.rb +5 -5
- data/lib/chef/search/query.rb +0 -3
- data/lib/chef/train_transport.rb +3 -1
- data/lib/chef/util/powershell/ps_credential.rb +2 -2
- data/lib/chef/util/selinux.rb +1 -1
- data/lib/chef/util/windows/logon_session.rb +2 -2
- data/lib/chef/version.rb +1 -1
- data/lib/chef/win32/eventlog.rb +2 -2
- data/spec/data/cookbooks/starter/chefignore +8 -0
- data/spec/data/cookbooks/starter/files/sample.txt +1 -0
- data/spec/data/cookbooks/starter/metadata.rb +2 -0
- data/spec/data/cookbooks/starter/recipes/default.rb +4 -0
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +1 -1
- data/spec/functional/mixin/user_context_spec.rb +2 -2
- data/spec/functional/rebooter_spec.rb +1 -1
- data/spec/functional/resource/cookbook_file_spec.rb +2 -2
- data/spec/functional/resource/template_spec.rb +1 -1
- data/spec/functional/version_spec.rb +1 -1
- data/spec/functional/win32/crypto_spec.rb +1 -1
- data/spec/functional/win32/security_spec.rb +1 -1
- data/spec/functional/win32/service_manager_spec.rb +1 -1
- data/spec/functional/win32/sid_spec.rb +2 -2
- data/spec/functional/win32/version_info_spec.rb +1 -1
- data/spec/functional/win32/versions_spec.rb +1 -1
- data/spec/integration/knife/config_get_profile_spec.rb +2 -2
- data/spec/integration/knife/config_get_spec.rb +9 -2
- data/spec/integration/knife/config_list_profiles_spec.rb +2 -2
- data/spec/integration/knife/config_use_profile_spec.rb +2 -2
- data/spec/integration/knife/list_spec.rb +2 -2
- data/spec/integration/solo/solo_spec.rb +1 -1
- data/spec/support/matchers/leak.rb +1 -1
- data/spec/support/mock/platform.rb +1 -1
- data/spec/support/platform_helpers.rb +2 -0
- data/spec/support/shared/integration/integration_helper.rb +1 -1
- data/spec/support/shared/integration/knife_support.rb +1 -1
- data/spec/support/shared/unit/provider/file.rb +4 -4
- data/spec/unit/application/client_spec.rb +2 -2
- data/spec/unit/application/knife_spec.rb +17 -0
- data/spec/unit/application_spec.rb +1 -1
- data/spec/unit/chef_fs/file_pattern_spec.rb +2 -2
- data/spec/unit/chef_fs/path_util_spec.rb +3 -3
- data/spec/unit/client_spec.rb +2 -2
- data/spec/unit/cookbook/chefignore_spec.rb +31 -11
- data/spec/unit/cookbook/cookbook_version_loader_spec.rb +1 -1
- data/spec/unit/cookbook/syntax_check_spec.rb +2 -2
- data/spec/unit/cookbook_loader_spec.rb +2 -2
- data/spec/unit/cookbook_uploader_spec.rb +6 -1
- data/spec/unit/data_bag_spec.rb +2 -2
- data/spec/unit/data_collector_spec.rb +7 -0
- data/spec/unit/dsl/platform_introspection_spec.rb +31 -1
- data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +1 -1
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +7 -0
- data/spec/unit/knife/cookbook_show_spec.rb +1 -1
- data/spec/unit/knife/core/gem_glob_loader_spec.rb +1 -1
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +1 -1
- data/spec/unit/knife/core/subcommand_loader_spec.rb +1 -1
- data/spec/unit/knife/core/ui_spec.rb +2 -2
- data/spec/unit/knife/data_bag_from_file_spec.rb +2 -2
- data/spec/unit/knife/environment_from_file_spec.rb +2 -2
- data/spec/unit/knife/ssh_spec.rb +27 -17
- data/spec/unit/knife/status_spec.rb +1 -1
- data/spec/unit/knife/supermarket_install_spec.rb +1 -1
- data/spec/unit/mixin/path_sanity_spec.rb +3 -3
- data/spec/unit/mixin/shell_out_spec.rb +2 -3
- data/spec/unit/mixin/template_spec.rb +4 -4
- data/spec/unit/mixin/user_context_spec.rb +3 -3
- data/spec/unit/node_map_spec.rb +12 -12
- data/spec/unit/platform/query_helpers_spec.rb +9 -9
- data/spec/unit/provider/execute_spec.rb +1 -1
- data/spec/unit/provider/link_spec.rb +5 -5
- data/spec/unit/provider/package/openbsd_spec.rb +1 -1
- data/spec/unit/provider/package/smartos_spec.rb +1 -1
- data/spec/unit/provider/package/windows/exe_spec.rb +1 -1
- data/spec/unit/provider/package/windows_spec.rb +2 -2
- data/spec/unit/provider/remote_file/fetcher_spec.rb +2 -2
- data/spec/unit/provider/remote_file/local_file_spec.rb +1 -1
- data/spec/unit/provider/remote_file/network_file_spec.rb +1 -1
- data/spec/unit/provider/script_spec.rb +2 -2
- data/spec/unit/provider/service/systemd_service_spec.rb +26 -2
- data/spec/unit/provider/subversion_spec.rb +3 -3
- data/spec/unit/provider/systemd_unit_spec.rb +53 -4
- data/spec/unit/provider/user/dscl_spec.rb +1 -1
- data/spec/unit/provider_resolver_spec.rb +41 -61
- data/spec/unit/resource/chef_sleep_spec.rb +30 -0
- data/spec/unit/resource/cookbook_file_spec.rb +3 -3
- data/spec/unit/resource/remote_file_spec.rb +3 -3
- data/spec/unit/resource/windows_firewall_rule_spec.rb +69 -12
- data/spec/unit/role_spec.rb +2 -2
- data/spec/unit/shell_spec.rb +1 -1
- data/spec/unit/util/selinux_spec.rb +2 -2
- data/spec/unit/win32/error_spec.rb +1 -1
- data/spec/unit/win32/link_spec.rb +1 -1
- data/spec/unit/win32/security_spec.rb +1 -1
- data/spec/unit/windows_service_spec.rb +1 -1
- data/tasks/docs.rb +10 -2
- data/tasks/rspec.rb +8 -6
- metadata +33 -9
- data/lib/chef/mixin/train_helpers.rb +0 -60
- data/spec/unit/mash_spec.rb +0 -51
data/lib/chef/resource/batch.rb
CHANGED
@@ -21,6 +21,8 @@ require_relative "windows_script"
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Batch < Chef::Resource::WindowsScript
|
24
|
+
unified_mode true
|
25
|
+
|
24
26
|
provides :batch
|
25
27
|
|
26
28
|
description "Use the batch resource to execute a batch script using the cmd.exe interpreter on Windows. The batch resource creates and executes a temporary file (similar to how the script resource behaves), rather than running the command inline. Commands that are executed with this resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are run. Use not_if and only_if to guard this resource for idempotence."
|
@@ -22,10 +22,12 @@ require_relative "../dist"
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
24
|
class Breakpoint < Chef::Resource
|
25
|
+
unified_mode true
|
26
|
+
|
25
27
|
provides :breakpoint, target_mode: true
|
26
28
|
resource_name :breakpoint
|
27
29
|
|
28
|
-
description "Use the breakpoint resource to add breakpoints to recipes. Run the #{Chef::Dist::SHELL} in #{Chef::Dist::
|
30
|
+
description "Use the breakpoint resource to add breakpoints to recipes. Run the #{Chef::Dist::SHELL} in #{Chef::Dist::PRODUCT} mode, and then use those breakpoints to debug recipes. Breakpoints are ignored by the #{Chef::Dist::CLIENT} during an actual #{Chef::Dist::CLIENT} run. That said, breakpoints are typically used to debug recipes only when running them in a non-production environment, after which they are removed from those recipes before the parent cookbook is uploaded to the Chef server."
|
29
31
|
introduced "12.0"
|
30
32
|
|
31
33
|
default_action :break
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: 2008-2019, Chef Software
|
2
|
+
# Copyright:: 2008-2019, Chef Software Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -22,7 +22,7 @@ class Chef
|
|
22
22
|
resource_name :build_essential
|
23
23
|
provides(:build_essential) { true }
|
24
24
|
|
25
|
-
description "Use the build_essential resource to install packages required for compiling C software from source."
|
25
|
+
description "Use the build_essential resource to install the packages required for compiling C software from source."
|
26
26
|
introduced "14.0"
|
27
27
|
examples <<~DOC
|
28
28
|
Install compilation packages
|
@@ -52,7 +52,7 @@ class Chef
|
|
52
52
|
case node["platform_family"]
|
53
53
|
when "debian"
|
54
54
|
package %w{ autoconf binutils-doc bison build-essential flex gettext ncurses-dev }
|
55
|
-
when
|
55
|
+
when fedora_derived?
|
56
56
|
package %w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch }
|
57
57
|
|
58
58
|
# Ensure GCC 4 is available on older pre-6 EL
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: 2019, Chef Software Inc.
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require_relative "../resource"
|
18
|
+
require_relative "../dist"
|
19
|
+
|
20
|
+
class Chef
|
21
|
+
class Resource
|
22
|
+
class ChefSleep < Chef::Resource
|
23
|
+
resource_name :chef_sleep
|
24
|
+
provides :chef_sleep
|
25
|
+
|
26
|
+
unified_mode true
|
27
|
+
|
28
|
+
description "Use the chef_sleep resource to set the number of seconds to sleep during a #{Chef::Dist::PRODUCT} run. Only use this resource when a command or service exits successfully but is not ready for the next step of the recipe."
|
29
|
+
introduced "15.5"
|
30
|
+
examples <<~DOC
|
31
|
+
Sleep for 10 seconds
|
32
|
+
```ruby
|
33
|
+
chef_sleep '10'
|
34
|
+
```
|
35
|
+
|
36
|
+
Sleep for 10 seconds with a descriptive resource name for logging
|
37
|
+
```ruby
|
38
|
+
chef_sleep 'wait for the service to start' do
|
39
|
+
seconds 10
|
40
|
+
end
|
41
|
+
````
|
42
|
+
|
43
|
+
Use a notification from another resource to sleep only when necessary
|
44
|
+
```ruby
|
45
|
+
service 'Service that is slow to start and reports as started' do
|
46
|
+
service_name 'my_database'
|
47
|
+
action :start
|
48
|
+
notifies :sleep, chef_sleep['wait for service start']
|
49
|
+
end
|
50
|
+
|
51
|
+
chef_sleep 'wait for service start' do
|
52
|
+
seconds 30
|
53
|
+
action :nothing
|
54
|
+
end
|
55
|
+
```
|
56
|
+
DOC
|
57
|
+
|
58
|
+
property :seconds, [String, Integer],
|
59
|
+
description: "The number of seconds to sleep.",
|
60
|
+
coerce: proc { |s| Integer(s) },
|
61
|
+
name_property: true
|
62
|
+
|
63
|
+
action :sleep do
|
64
|
+
converge_by("sleep #{new_resource.seconds} seconds") do
|
65
|
+
sleep(new_resource.seconds)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -27,10 +27,11 @@ class Chef
|
|
27
27
|
class Resource
|
28
28
|
class CookbookFile < Chef::Resource::File
|
29
29
|
include Chef::Mixin::Securable
|
30
|
+
unified_mode true
|
30
31
|
|
31
32
|
resource_name :cookbook_file
|
32
33
|
|
33
|
-
description "Use the cookbook_file resource to transfer files from a sub-directory of COOKBOOK_NAME/files/ to a specified path located on a host that is running the #{Chef::Dist::
|
34
|
+
description "Use the cookbook_file resource to transfer files from a sub-directory of COOKBOOK_NAME/files/ to a specified path located on a host that is running the #{Chef::Dist::PRODUCT}. The file is selected according to file specificity, which allows different source files to be used based on the hostname, host platform (operating system, distro, or as appropriate), or platform version. Files that are located in the COOKBOOK_NAME/files/default sub-directory may be used on any platform.\n\nDuring a #{Chef::Dist::PRODUCT} run, the checksum for each local file is calculated and then compared against the checksum for the same file as it currently exists in the cookbook on the #{Chef::Dist::SERVER_PRODUCT}. A file is not transferred when the checksums match. Only files that require an update are transferred from the #{Chef::Dist::SERVER_PRODUCT} to a node."
|
34
35
|
|
35
36
|
property :source, [ String, Array ],
|
36
37
|
description: "The name of the file in COOKBOOK_NAME/files/default or the path to a file located in COOKBOOK_NAME/files. The path must include the file name and its extension. This can be used to distribute specific files depending upon the platform used.",
|
data/lib/chef/resource/csh.rb
CHANGED
@@ -22,6 +22,8 @@ require_relative "../provider/script"
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
24
|
class Csh < Chef::Resource::Script
|
25
|
+
unified_mode true
|
26
|
+
|
25
27
|
description "Use the csh resource to execute scripts using the csh interpreter."\
|
26
28
|
" This resource may also use any of the actions and properties that are"\
|
27
29
|
" available to the execute resource. Commands that are executed with this"\
|
@@ -23,7 +23,7 @@ class Chef
|
|
23
23
|
resource_name :dmg_package
|
24
24
|
provides(:dmg_package) { true }
|
25
25
|
|
26
|
-
description "Use the dmg_package resource to install a dmg
|
26
|
+
description "Use the dmg_package resource to install a package from a .dmg file. The resource will retrieve the dmg file from a remote URL, mount it using OS X's hdidutil, copy the application (.app directory) to the specified destination (/Applications), and detach the image using hdiutil. The dmg file will be stored in the Chef::Config[:file_cache_path]."
|
27
27
|
introduced "14.0"
|
28
28
|
examples <<~DOC
|
29
29
|
Install Google Chrome via the DMG package
|
@@ -41,7 +41,7 @@ class Chef
|
|
41
41
|
|
42
42
|
provides :dnf_package
|
43
43
|
|
44
|
-
description "Use the dnf_package resource to install, upgrade, and remove packages with DNF for Fedora
|
44
|
+
description "Use the dnf_package resource to install, upgrade, and remove packages with DNF for Fedora and RHEL 8+. The dnf_package resource is able to resolve provides data for packages much like DNF 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."
|
45
45
|
introduced "12.18"
|
46
46
|
|
47
47
|
allowed_actions :install, :upgrade, :remove, :purge, :reconfig, :lock, :unlock, :flush_cache
|
data/lib/chef/resource/file.rb
CHANGED
@@ -28,10 +28,11 @@ class Chef
|
|
28
28
|
class Resource
|
29
29
|
class File < Chef::Resource
|
30
30
|
include Chef::Mixin::Securable
|
31
|
+
unified_mode true
|
31
32
|
|
32
33
|
description "Use the file resource to manage files directly on a node."
|
33
34
|
|
34
|
-
if
|
35
|
+
if ChefUtils.windows?
|
35
36
|
# Use Windows rights instead of standard *nix permissions
|
36
37
|
state_attrs :checksum, :rights, :deny_rights
|
37
38
|
else
|
data/lib/chef/resource/git.rb
CHANGED
@@ -21,6 +21,8 @@ require_relative "scm"
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Git < Chef::Resource::Scm
|
24
|
+
unified_mode true
|
25
|
+
|
24
26
|
description "Use the git resource to manage source control resources that exist in a git repository. git version 1.6.5 (or higher) is required to use all of the functionality in the git resource."
|
25
27
|
|
26
28
|
property :additional_remotes, Hash,
|
data/lib/chef/resource/group.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Tyler Cloke (<tyler@chef.io>)
|
4
|
-
# Copyright:: Copyright 2008-
|
4
|
+
# Copyright:: Copyright 2008-2019, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -32,7 +32,7 @@ class Chef
|
|
32
32
|
introduced "12.0"
|
33
33
|
|
34
34
|
property :homebrew_user, [ String, Integer ],
|
35
|
-
description: "The name of the Homebrew owner to be used by
|
35
|
+
description: "The name of the Homebrew owner to be used by #{Chef::Dist::PRODUCT} when executing a command."
|
36
36
|
|
37
37
|
end
|
38
38
|
end
|
@@ -26,6 +26,8 @@ class Chef
|
|
26
26
|
# device 'eth1'
|
27
27
|
# end
|
28
28
|
class Ifconfig < Chef::Resource
|
29
|
+
unified_mode true
|
30
|
+
|
29
31
|
resource_name :ifconfig
|
30
32
|
|
31
33
|
description "Use the ifconfig resource to manage interfaces on Unix and Linux systems."
|
@@ -47,7 +49,7 @@ class Chef
|
|
47
49
|
|
48
50
|
property :family, String, default: "inet",
|
49
51
|
introduced: "14.0",
|
50
|
-
description: "Networking family option for Debian-based systems
|
52
|
+
description: "Networking family option for Debian-based systems; for example: inet or inet6."
|
51
53
|
|
52
54
|
property :inet_addr, String,
|
53
55
|
description: "The Internet host address for the network interface."
|
data/lib/chef/resource/ksh.rb
CHANGED
@@ -21,6 +21,8 @@ require_relative "script"
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Ksh < Chef::Resource::Script
|
24
|
+
unified_mode true
|
25
|
+
|
24
26
|
description "Use the ksh resource to execute scripts using the Korn shell (ksh)"\
|
25
27
|
" interpreter. This resource may also use any of the actions and properties"\
|
26
28
|
" that are available to the execute resource. Commands that are executed"\
|
data/lib/chef/resource/link.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Tyler Cloke (<tyler@chef.io>)
|
4
|
-
# Copyright:: Copyright 2008-
|
4
|
+
# Copyright:: Copyright 2008-2019, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -24,6 +24,8 @@ class Chef
|
|
24
24
|
class Resource
|
25
25
|
class Link < Chef::Resource
|
26
26
|
include Chef::Mixin::Securable
|
27
|
+
unified_mode true
|
28
|
+
|
27
29
|
resource_name :link
|
28
30
|
provides :link
|
29
31
|
|
@@ -77,7 +79,7 @@ class Chef
|
|
77
79
|
# On certain versions of windows links are not supported. Make
|
78
80
|
# sure we are not on such a platform.
|
79
81
|
def verify_links_supported!
|
80
|
-
if
|
82
|
+
if ChefUtils.windows?
|
81
83
|
require_relative "../win32/file"
|
82
84
|
begin
|
83
85
|
Chef::ReservedNames::Win32::File.verify_links_supported!
|
data/lib/chef/resource/locale.rb
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
# Unless required by applicable law or agreed to in writing, software
|
12
12
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
13
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific
|
14
|
+
# See the License for the specific language governing permissions and
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
data/lib/chef/resource/log.rb
CHANGED
data/lib/chef/resource/ohai.rb
CHANGED
data/lib/chef/resource/perl.rb
CHANGED
data/lib/chef/resource/python.rb
CHANGED
data/lib/chef/resource/reboot.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Tyler Cloke (<tyler@chef.io>)
|
4
|
-
# Copyright:: Copyright 2008-
|
4
|
+
# Copyright:: Copyright 2008-2019, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -25,6 +25,7 @@ class Chef
|
|
25
25
|
class Resource
|
26
26
|
class RemoteDirectory < Chef::Resource::Directory
|
27
27
|
include Chef::Mixin::Securable
|
28
|
+
unified_mode true
|
28
29
|
|
29
30
|
description "Use the remote_directory resource to incrementally transfer a directory from a cookbook to a node. The director that is copied from the cookbook should be located under COOKBOOK_NAME/files/default/REMOTE_DIRECTORY. The remote_directory resource will obey file specificity."
|
30
31
|
|
@@ -36,7 +37,7 @@ class Chef
|
|
36
37
|
@delete = false
|
37
38
|
end
|
38
39
|
|
39
|
-
if
|
40
|
+
if ChefUtils.windows?
|
40
41
|
# create a second instance of the 'rights' attribute (property)
|
41
42
|
rights_attribute(:files_rights)
|
42
43
|
end
|
@@ -27,6 +27,7 @@ class Chef
|
|
27
27
|
class Resource
|
28
28
|
class RemoteFile < Chef::Resource::File
|
29
29
|
include Chef::Mixin::Securable
|
30
|
+
unified_mode true
|
30
31
|
|
31
32
|
description "Use the remote_file resource to transfer a file from a remote location"\
|
32
33
|
" using file specificity. This resource is similar to the file resource."
|
data/lib/chef/resource/ruby.rb
CHANGED
@@ -22,6 +22,8 @@ require_relative "../provider/script"
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
24
|
class Ruby < Chef::Resource::Script
|
25
|
+
unified_mode true
|
26
|
+
|
25
27
|
description "Use the ruby resource to execute scripts using the Ruby interpreter. This"\
|
26
28
|
" resource may also use any of the actions and properties that are available"\
|
27
29
|
" to the execute resource. Commands that are executed with this resource are (by"\
|
@@ -24,6 +24,8 @@ require_relative "../dist"
|
|
24
24
|
class Chef
|
25
25
|
class Resource
|
26
26
|
class RubyBlock < Chef::Resource
|
27
|
+
unified_mode true
|
28
|
+
|
27
29
|
provides :ruby_block, target_mode: true
|
28
30
|
|
29
31
|
description "Use the ruby_block resource to execute Ruby code during a #{Chef::Dist::PRODUCT} run."\
|
data/lib/chef/resource/scm.rb
CHANGED
data/lib/chef/resource/script.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: AJ Christensen (<aj@hjksolutions.com>)
|
3
3
|
# Author:: Tyler Cloke (<tyler@chef.io>)
|
4
|
-
# Copyright:: Copyright 2008-
|
4
|
+
# Copyright:: Copyright 2008-2019, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -17,6 +17,7 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
+
require "chef-utils/dsl/service" unless defined?(ChefUtils::DSL::Service)
|
20
21
|
require_relative "../resource"
|
21
22
|
require "shellwords" unless defined?(Shellwords)
|
22
23
|
require_relative "../dist"
|
@@ -24,7 +25,11 @@ require_relative "../dist"
|
|
24
25
|
class Chef
|
25
26
|
class Resource
|
26
27
|
class Service < Chef::Resource
|
28
|
+
include ChefUtils::DSL::Service
|
29
|
+
extend ChefUtils::DSL::Service
|
30
|
+
|
27
31
|
provides :service, target_mode: true
|
32
|
+
|
28
33
|
identity_attr :service_name
|
29
34
|
|
30
35
|
description "Use the service resource to manage a service."
|
@@ -90,6 +95,9 @@ class Chef
|
|
90
95
|
# if the service is masked or not
|
91
96
|
property :masked, [ TrueClass, FalseClass ], skip_docs: true
|
92
97
|
|
98
|
+
# if the service is indirect or not
|
99
|
+
property :indirect, [ TrueClass, FalseClass ], skip_docs: true
|
100
|
+
|
93
101
|
property :options, [ Array, String ],
|
94
102
|
description: "Solaris platform only. Options to pass to the service command. See the svcadm manual for details of possible options.",
|
95
103
|
coerce: proc { |x| x.respond_to?(:split) ? x.shellsplit : x }
|