chef 14.4.56-universal-mingw32 → 14.5.27-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -1
- data/VERSION +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/chef/.DS_Store +0 -0
- data/lib/chef/client.rb +1 -1
- data/lib/chef/cookbook_version.rb +2 -2
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/node_map.rb +4 -10
- data/lib/chef/provider/.DS_Store +0 -0
- data/lib/chef/provider/dsc_resource.rb +2 -2
- data/lib/chef/provider/dsc_script.rb +4 -4
- data/lib/chef/provider/package/powershell.rb +1 -1
- data/lib/chef/provider/powershell_script.rb +3 -3
- data/lib/chef/provider/script.rb +2 -2
- data/lib/chef/resource/apt_package.rb +1 -0
- data/lib/chef/resource/apt_repository.rb +1 -1
- data/lib/chef/resource/build_essential.rb +38 -38
- data/lib/chef/resource/chef_gem.rb +4 -1
- data/lib/chef/resource/chocolatey_package.rb +2 -1
- data/lib/chef/resource/directory.rb +6 -2
- data/lib/chef/resource/dmg_package.rb +1 -4
- data/lib/chef/resource/dnf_package.rb +20 -23
- data/lib/chef/resource/dpkg_package.rb +1 -3
- data/lib/chef/resource/dsc_resource.rb +2 -5
- data/lib/chef/resource/dsc_script.rb +1 -8
- data/lib/chef/resource/execute.rb +4 -1
- data/lib/chef/resource/gem_package.rb +17 -19
- data/lib/chef/resource/git.rb +4 -4
- data/lib/chef/resource/homebrew_cask.rb +2 -2
- data/lib/chef/resource/homebrew_tap.rb +3 -3
- data/lib/chef/resource/hostname.rb +4 -4
- data/lib/chef/resource/http_request.rb +1 -3
- data/lib/chef/resource/ifconfig.rb +1 -1
- data/lib/chef/resource/locale.rb +93 -0
- data/lib/chef/resource/macos_userdefaults.rb +2 -4
- data/lib/chef/resource/macosx_service.rb +2 -3
- data/lib/chef/resource/mount.rb +45 -18
- data/lib/chef/resource/msu_package.rb +10 -7
- data/lib/chef/resource/ohai.rb +2 -4
- data/lib/chef/resource/ohai_hint.rb +3 -3
- data/lib/chef/resource/openssl_dhparam.rb +5 -5
- data/lib/chef/resource/openssl_ec_private_key.rb +5 -5
- data/lib/chef/resource/openssl_ec_public_key.rb +5 -5
- data/lib/chef/resource/openssl_rsa_private_key.rb +6 -6
- data/lib/chef/resource/openssl_rsa_public_key.rb +7 -7
- data/lib/chef/resource/openssl_x509_certificate.rb +11 -11
- data/lib/chef/resource/openssl_x509_crl.rb +2 -2
- data/lib/chef/resource/openssl_x509_request.rb +7 -7
- data/lib/chef/resource/osx_profile.rb +13 -8
- data/lib/chef/resource/package.rb +26 -8
- data/lib/chef/resource/paludis_package.rb +3 -1
- data/lib/chef/resource/portage_package.rb +2 -1
- data/lib/chef/resource/powershell_package.rb +17 -9
- data/lib/chef/resource/powershell_package_source.rb +1 -1
- data/lib/chef/resource/reboot.rb +7 -2
- data/lib/chef/resource/rhsm_errata_level.rb +1 -3
- data/lib/chef/resource/route.rb +1 -1
- data/lib/chef/resource/scm.rb +42 -14
- data/lib/chef/resource/subversion.rb +7 -0
- data/lib/chef/resource/sudo.rb +7 -7
- data/lib/chef/resource/swap_file.rb +2 -2
- data/lib/chef/resource/sysctl.rb +1 -1
- data/lib/chef/resource/systemd_unit.rb +2 -1
- data/lib/chef/resource/windows_ad_join.rb +9 -4
- data/lib/chef/resource/windows_auto_run.rb +5 -5
- data/lib/chef/resource/windows_env.rb +1 -3
- data/lib/chef/resource/windows_feature_dism.rb +4 -5
- data/lib/chef/resource/windows_font.rb +3 -5
- data/lib/chef/resource/windows_package.rb +1 -2
- data/lib/chef/resource/windows_printer.rb +7 -9
- data/lib/chef/resource/windows_printer_port.rb +1 -1
- data/lib/chef/resource/windows_service.rb +26 -21
- data/lib/chef/resource/windows_shortcut.rb +4 -4
- data/lib/chef/resource/windows_task.rb +82 -36
- data/lib/chef/resource/windows_workgroup.rb +101 -0
- data/lib/chef/resource/yum_package.rb +30 -20
- data/lib/chef/resource/yum_repository.rb +134 -45
- data/lib/chef/resource/zypper_package.rb +8 -4
- data/lib/chef/resource/zypper_repository.rb +58 -20
- data/lib/chef/resource_inspector.rb +5 -3
- data/lib/chef/resources.rb +2 -0
- data/lib/chef/util/powershell/cmdlet.rb +1 -1
- data/lib/chef/version.rb +1 -1
- data/spec/functional/resource/dsc_resource_spec.rb +3 -3
- data/spec/functional/resource/powershell_script_spec.rb +2 -2
- data/spec/functional/win32/crypto_spec.rb +1 -1
- data/spec/unit/cookbook_version_file_specificity_spec.rb +20 -0
- data/spec/unit/node_map_spec.rb +3 -3
- data/spec/unit/platform/query_helpers_spec.rb +4 -4
- data/spec/unit/provider/dsc_resource_spec.rb +2 -2
- data/spec/unit/provider/dsc_script_spec.rb +1 -1
- data/spec/unit/resource/dsc_resource_spec.rb +1 -1
- data/spec/unit/resource/locale_spec.rb +60 -0
- data/spec/unit/resource/scm_spec.rb +0 -10
- data/spec/unit/resource/windows_workgroup_spec.rb +47 -0
- data/tasks/dependencies.rb +2 -22
- data/tasks/templates/prerelease.md.erb +2 -2
- data/tasks/templates/release.md.erb +1 -1
- metadata +8 -5
- data/tasks/cbgb.rb +0 -84
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0add5221e126b5b790277a9f1b3fb5dbd6a8580f5017cc0bd7384f4bca65040
|
4
|
+
data.tar.gz: 8407fff96669018d3e5b3116d3f57342efa484ef99c362ee9182f432de2df521
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae253c08e8cbf83c09a358134631ee1a12542eba90fa09d1635149ca01ec7f3b139d671432c0f76df24fe7452c2a5ae5ae200190fda2da90c8179b1b9596b69c
|
7
|
+
data.tar.gz: 25271ae95bddeb8e43658830abaee0f58f9c734d28c09151e40271f9a3a062cb4d9a041b48ef21621d89be8702db47175bc19846cf1fa4ddbeafc5702945cd3e
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
14.
|
1
|
+
14.5.27
|
data/lib/.DS_Store
CHANGED
Binary file
|
data/lib/chef/.DS_Store
CHANGED
Binary file
|
data/lib/chef/client.rb
CHANGED
@@ -157,7 +157,7 @@ class Chef
|
|
157
157
|
event_handlers += Array(Chef::Config[:event_handlers])
|
158
158
|
|
159
159
|
@events = EventDispatch::Dispatcher.new(*event_handlers)
|
160
|
-
#
|
160
|
+
# @todo it seems like a bad idea to be deletin' other peoples' hashes.
|
161
161
|
@override_runlist = args.delete(:override_runlist)
|
162
162
|
@specific_recipes = args.delete(:specific_recipes)
|
163
163
|
@run_status = Chef::RunStatus.new(nil, events)
|
@@ -296,9 +296,9 @@ class Chef
|
|
296
296
|
# we're just going to make cookbook_files out of these and make the
|
297
297
|
# cookbook find them by filespecificity again. but it's the shortest
|
298
298
|
# path to "success" for now.
|
299
|
-
if manifest_record_path =~ /(#{Regexp.escape(segment.to_s)}\/[^\/]
|
299
|
+
if manifest_record_path =~ /(#{Regexp.escape(segment.to_s)}\/[^\/]*\/?#{Regexp.escape(dirname)})\/.+$/
|
300
300
|
specificity_dirname = $1
|
301
|
-
non_specific_path = manifest_record_path[/#{Regexp.escape(segment.to_s)}\/[^\/]
|
301
|
+
non_specific_path = manifest_record_path[/#{Regexp.escape(segment.to_s)}\/[^\/]*\/?#{Regexp.escape(dirname)}\/(.+)$/, 1]
|
302
302
|
# Record the specificity_dirname only if it's in the list of
|
303
303
|
# valid preferences
|
304
304
|
if filenames_by_pref[specificity_dirname]
|
@@ -86,7 +86,7 @@ class Chef
|
|
86
86
|
# always set the ExecutionPolicy flag
|
87
87
|
# see http://technet.microsoft.com/en-us/library/ee176961.aspx
|
88
88
|
"-ExecutionPolicy Unrestricted",
|
89
|
-
#
|
89
|
+
# PowerShell will hang if STDIN is redirected
|
90
90
|
# http://connect.microsoft.com/PowerShell/feedback/details/572313/powershell-exe-can-hang-if-stdin-is-redirected
|
91
91
|
"-InputFormat None",
|
92
92
|
]
|
data/lib/chef/node_map.rb
CHANGED
@@ -38,19 +38,13 @@
|
|
38
38
|
class Chef
|
39
39
|
class NodeMap
|
40
40
|
COLLISION_WARNING_14 = <<~EOH.gsub(/\s+/, " ").strip
|
41
|
-
%{type_caps} %{key}
|
42
|
-
|
43
|
-
next major release of Chef (15.0, April 2019). You may be able to remove this cookbook dependency from
|
44
|
-
your runlist if you do not use other recipes/resources/libraries from the cookbook.
|
45
|
-
Alternatively there may be a newer version of this cookbook without the %{key} %{type}.
|
41
|
+
%{type_caps} %{key} from a cookbook is overriding the %{type} from the client. Please upgrade your cookbook
|
42
|
+
or remove the cookbook from your run_list before the next major release of Chef.
|
46
43
|
EOH
|
47
44
|
|
48
45
|
COLLISION_WARNING_15 = <<~EOH.gsub(/\s+/, " ").strip
|
49
|
-
%{type_caps} %{key}
|
50
|
-
|
51
|
-
which will be ignored. You may be able to remove this cookbook dependency from
|
52
|
-
your runlist if you do not use other recipes/resources/libraries from the cookbook.
|
53
|
-
Alternatively there may be a newer version of this cookbook without the %{key} %{type}.
|
46
|
+
%{type_caps} %{key} from the client is overriding the %{type} from a cookbook. Please upgrade your cookbook
|
47
|
+
or remove the cookbook from your run_list.
|
54
48
|
EOH
|
55
49
|
|
56
50
|
#
|
data/lib/chef/provider/.DS_Store
CHANGED
Binary file
|
@@ -48,10 +48,10 @@ class Chef
|
|
48
48
|
def define_resource_requirements
|
49
49
|
requirements.assert(:run) do |a|
|
50
50
|
a.assertion { supports_dsc_invoke_resource? }
|
51
|
-
err = ["You must have
|
51
|
+
err = ["You must have PowerShell version >= 5.0.10018.0 to use dsc_resource."]
|
52
52
|
a.failure_message Chef::Exceptions::ProviderNotFound,
|
53
53
|
err
|
54
|
-
a.whyrun err + ["Assuming a previous resource installs
|
54
|
+
a.whyrun err + ["Assuming a previous resource installs PowerShell 5.0.10018.0 or higher."]
|
55
55
|
a.block_action!
|
56
56
|
end
|
57
57
|
requirements.assert(:run) do |a|
|
@@ -63,11 +63,11 @@ class Chef
|
|
63
63
|
err = [
|
64
64
|
"Could not find PowerShell DSC support on the system",
|
65
65
|
powershell_info_str,
|
66
|
-
"
|
66
|
+
"PowerShell 4.0 or higher was not detected on your system and is required to use the dsc_script resource.",
|
67
67
|
]
|
68
68
|
a.assertion { supports_dsc? }
|
69
69
|
a.failure_message Chef::Exceptions::ProviderNotFound, err.join(" ")
|
70
|
-
a.whyrun err + ["Assuming a previous resource installs
|
70
|
+
a.whyrun err + ["Assuming a previous resource installs PowerShell 4.0 or higher."]
|
71
71
|
a.block_action!
|
72
72
|
end
|
73
73
|
end
|
@@ -175,9 +175,9 @@ class Chef
|
|
175
175
|
|
176
176
|
def powershell_info_str
|
177
177
|
if run_context && run_context.node[:languages] && run_context.node[:languages][:powershell]
|
178
|
-
install_info = "
|
178
|
+
install_info = "PowerShell #{run_context.node[:languages][:powershell][:version]} was found on the system."
|
179
179
|
else
|
180
|
-
install_info = "
|
180
|
+
install_info = "PowerShell was not found."
|
181
181
|
end
|
182
182
|
end
|
183
183
|
end
|
@@ -37,7 +37,7 @@ class Chef
|
|
37
37
|
def define_resource_requirements
|
38
38
|
super
|
39
39
|
if powershell_out("$PSVersionTable.PSVersion.Major").stdout.strip.to_i < 5
|
40
|
-
raise "Minimum installed
|
40
|
+
raise "Minimum installed PowerShell Version required is 5"
|
41
41
|
end
|
42
42
|
requirements.assert(:install) do |a|
|
43
43
|
a.assertion { candidates_exist_for_all_uninstalled? }
|
@@ -129,7 +129,7 @@ EOH
|
|
129
129
|
"-NonInteractive",
|
130
130
|
"-NoProfile",
|
131
131
|
"-ExecutionPolicy #{execution_policy}",
|
132
|
-
#
|
132
|
+
# PowerShell will hang if STDIN is redirected
|
133
133
|
# http://connect.microsoft.com/PowerShell/feedback/details/572313/powershell-exe-can-hang-if-stdin-is-redirected
|
134
134
|
"-InputFormat None",
|
135
135
|
]
|
@@ -137,10 +137,10 @@ EOH
|
|
137
137
|
|
138
138
|
# A wrapper script is used to launch user-supplied script while
|
139
139
|
# still obtaining useful process exit codes. Unless you
|
140
|
-
# explicitly call exit in
|
140
|
+
# explicitly call exit in PowerShell, the powershell.exe
|
141
141
|
# interpreter returns only 0 for success or 1 for failure. Since
|
142
142
|
# we'd like to get specific exit codes from executable tools run
|
143
|
-
# with
|
143
|
+
# with PowerShell, we do some work using the automatic variables
|
144
144
|
# $? and $LASTEXITCODE to return the process exit code of the
|
145
145
|
# last process run in the script if it is the last command
|
146
146
|
# executed, otherwise 0 or 1 based on whether $? is set to true
|
data/lib/chef/provider/script.rb
CHANGED
@@ -49,9 +49,9 @@ class Chef
|
|
49
49
|
|
50
50
|
def load_current_resource
|
51
51
|
super
|
52
|
-
# @todo Chef-
|
52
|
+
# @todo Chef-15: change this to an exception
|
53
53
|
if code.nil?
|
54
|
-
logger.warn "#{new_resource}: No code attribute was given, resource does nothing, this behavior is deprecated and will be removed in Chef
|
54
|
+
logger.warn "#{new_resource}: No code attribute was given, resource does nothing, this behavior is deprecated and will be removed in Chef 15 (April 2019)"
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -36,7 +36,7 @@ class Chef
|
|
36
36
|
regex: [/^[^\/]+$/],
|
37
37
|
description: "The name of the repository to configure, if it differs from the name of the resource block. The value of this setting must not contain spaces.",
|
38
38
|
validation_message: "repo_name property cannot contain a forward slash '/'",
|
39
|
-
name_property: true
|
39
|
+
introduced: "14.1", name_property: true
|
40
40
|
|
41
41
|
property :uri, String,
|
42
42
|
description: "The base of the Debian distribution."
|
@@ -29,7 +29,7 @@ class Chef
|
|
29
29
|
property :name, String, default: ""
|
30
30
|
|
31
31
|
property :compile_time, [TrueClass, FalseClass],
|
32
|
-
description: "Install build essential packages at compile time.",
|
32
|
+
description: "Install the build essential packages at compile time.",
|
33
33
|
default: false
|
34
34
|
|
35
35
|
action :install do
|
@@ -38,22 +38,22 @@ class Chef
|
|
38
38
|
|
39
39
|
case node["platform_family"]
|
40
40
|
when "debian"
|
41
|
-
|
41
|
+
package %w{ autoconf binutils-doc bison build-essential flex gettext ncurses-dev }
|
42
42
|
when "amazon", "fedora", "rhel"
|
43
|
-
|
43
|
+
package %w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch }
|
44
44
|
|
45
45
|
# Ensure GCC 4 is available on older pre-6 EL
|
46
|
-
|
46
|
+
package %w{ gcc44 gcc44-c++ } if platform_family?("rhel") && node["platform_version"].to_i < 6
|
47
47
|
when "freebsd"
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
package "devel/gmake"
|
49
|
+
package "devel/autoconf"
|
50
|
+
package "devel/m4"
|
51
|
+
package "devel/gettext"
|
52
52
|
when "mac_os_x"
|
53
53
|
unless xcode_cli_installed?
|
54
54
|
# This script was graciously borrowed and modified from Tim Sutton's
|
55
55
|
# osx-vm-templates at https://github.com/timsutton/osx-vm-templates/blob/b001475df54a9808d3d56d06e71b8fa3001fff42/scripts/xcode-cli-tools.sh
|
56
|
-
|
56
|
+
execute "install XCode Command Line tools" do
|
57
57
|
command <<-EOH.gsub(/^ {14}/, "")
|
58
58
|
# create the placeholder file that's checked by CLI updates' .dist code
|
59
59
|
# in Apple's SUS catalog
|
@@ -68,46 +68,46 @@ class Chef
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
when "omnios"
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
71
|
+
package "developer/gcc48"
|
72
|
+
package "developer/object-file"
|
73
|
+
package "developer/linker"
|
74
|
+
package "developer/library/lint"
|
75
|
+
package "developer/build/gnu-make"
|
76
|
+
package "system/header"
|
77
|
+
package "system/library/math/header-math"
|
78
78
|
|
79
79
|
# Per OmniOS documentation, the gcc bin dir isn't in the default
|
80
80
|
# $PATH, so add it to the running process environment
|
81
81
|
# http://omnios.omniti.com/wiki.php/DevEnv
|
82
82
|
ENV["PATH"] = "#{ENV['PATH']}:/opt/gcc-4.7.2/bin"
|
83
83
|
when "solaris2"
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
84
|
+
package "autoconf"
|
85
|
+
package "automake"
|
86
|
+
package "bison"
|
87
|
+
package "gnu-coreutils"
|
88
|
+
package "flex"
|
89
|
+
package "gcc" do
|
90
90
|
# lock because we don't use 5 yet
|
91
91
|
version "4.8.2"
|
92
92
|
end
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
93
|
+
package "gcc-3"
|
94
|
+
package "gnu-grep"
|
95
|
+
package "gnu-make"
|
96
|
+
package "gnu-patch"
|
97
|
+
package "gnu-tar"
|
98
|
+
package "make"
|
99
|
+
package "pkg-config"
|
100
|
+
package "ucb"
|
101
101
|
when "smartos"
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
102
|
+
package "autoconf"
|
103
|
+
package "binutils"
|
104
|
+
package "build-essential"
|
105
|
+
package "gcc47"
|
106
|
+
package "gmake"
|
107
|
+
package "pkg-config"
|
108
108
|
when "suse"
|
109
|
-
|
110
|
-
|
109
|
+
package %w{ autoconf bison flex gcc gcc-c++ kernel-default-devel make m4 }
|
110
|
+
package %w{ gcc48 gcc48-c++ } if node["platform_version"].to_i < 12
|
111
111
|
else
|
112
112
|
Chef::Log.warn <<-EOH
|
113
113
|
The build_essential resource does not currently support the '#{node['platform_family']}'
|
@@ -37,10 +37,13 @@ class Chef
|
|
37
37
|
resource_name :chef_gem
|
38
38
|
|
39
39
|
property :gem_binary, default: "#{RbConfig::CONFIG['bindir']}/gem",
|
40
|
+
description: "The path of a gem binary to use for the installation. By default, the same version of Ruby that is used by the chef-client will be installed.",
|
40
41
|
callbacks: {
|
41
42
|
"The chef_gem resource is restricted to the current gem environment, use gem_package to install to other environments." => proc { |v| v == "#{RbConfig::CONFIG['bindir']}/gem" },
|
42
43
|
}
|
43
|
-
property :compile_time, [TrueClass, FalseClass],
|
44
|
+
property :compile_time, [TrueClass, FalseClass],
|
45
|
+
description: "Controls the phase during which a gem is installed on a node. Set to 'true' to install a gem while the resource collection is being built (the 'compile phase'). Set to 'false' to install a gem while the chef-client is configuring the node (the 'converge phase').",
|
46
|
+
default: false, desired_state: false
|
44
47
|
|
45
48
|
# force the resource to compile time if the compile time property has been set
|
46
49
|
def after_created
|
@@ -43,7 +43,8 @@ class Chef
|
|
43
43
|
|
44
44
|
property :returns, [Integer, Array],
|
45
45
|
description: "The exit code(s) returned a chocolatey package that indicate success.",
|
46
|
-
default: [ 0 ], desired_state: false
|
46
|
+
default: [ 0 ], desired_state: false,
|
47
|
+
introduced: "12.18"
|
47
48
|
end
|
48
49
|
end
|
49
50
|
end
|
@@ -40,8 +40,12 @@ class Chef
|
|
40
40
|
default_action :create
|
41
41
|
allowed_actions :create, :delete
|
42
42
|
|
43
|
-
property :path, String, name_property: true, identity: true
|
44
|
-
|
43
|
+
property :path, String, name_property: true, identity: true,
|
44
|
+
description: "The path to the directory. Using a fully qualified path is recommended, but is not always required."
|
45
|
+
|
46
|
+
property :recursive, [ TrueClass, FalseClass ],
|
47
|
+
description: "Create or delete parent directories recursively. For the owner, group, and mode properties, the value of this attribute applies only to the leaf directory.",
|
48
|
+
default: false
|
45
49
|
end
|
46
50
|
end
|
47
51
|
end
|
@@ -23,10 +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 'package'. The resource will retrieve the"
|
27
|
-
" dmg file from a remote URL, mount it using OS X's hdidutil, copy the application (.app directory)"\
|
28
|
-
" to the specified destination (/Applications), and detach the image using hdiutil. The dmg file"\
|
29
|
-
" will be stored in the Chef::Config[:file_cache_path]."
|
26
|
+
description "Use the dmg_package resource to install a dmg 'package'. 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]."
|
30
27
|
introduced "14.0"
|
31
28
|
|
32
29
|
property :app, String,
|
@@ -40,36 +40,33 @@ class Chef
|
|
40
40
|
|
41
41
|
provides :dnf_package
|
42
42
|
|
43
|
-
description "Use the dnf_package resource to install, upgrade, and remove packages"
|
44
|
-
" with DNF for Fedora platforms. The dnf_package resource is able to"\
|
45
|
-
" resolve provides data for packages much like DNF can do when it is"\
|
46
|
-
" run from the command line. This allows a variety of options for"\
|
47
|
-
" installing packages, like minimum versions, virtual provides,"\
|
48
|
-
" and library names."
|
43
|
+
description "Use the dnf_package resource to install, upgrade, and remove packages with DNF for Fedora platforms. 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."
|
49
44
|
introduced "12.18"
|
50
45
|
|
51
46
|
allowed_actions :install, :upgrade, :remove, :purge, :reconfig, :lock, :unlock, :flush_cache
|
52
47
|
|
53
48
|
# Install a specific arch
|
54
|
-
property :arch, [String, Array],
|
49
|
+
property :arch, [String, Array],
|
50
|
+
description: "The architecture of the package to be installed or upgraded. This value can also be passed as part of the package name.",
|
51
|
+
coerce: proc { |x| [x].flatten }
|
55
52
|
|
56
53
|
# Flush the in-memory available/installed cache, this does not flush the dnf caches on disk
|
57
|
-
property :flush_cache,
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
54
|
+
property :flush_cache, Hash,
|
55
|
+
description: "Flush the in-memory cache before or after a DNF operation that installs, upgrades, or removes a package. DNF automatically synchronizes remote metadata to a local cache. The chef-client creates a copy of the local cache, and then stores it in-memory during the chef-client run. The in-memory cache allows packages to be installed during the chef-client run without the need to continue synchronizing the remote metadata to the local cache while the chef-client run is in-progress.",
|
56
|
+
default: { before: false, after: false },
|
57
|
+
coerce: proc { |v|
|
58
|
+
if v.is_a?(Hash)
|
59
|
+
v
|
60
|
+
elsif v.is_a?(Array)
|
61
|
+
v.each_with_object({}) { |arg, obj| obj[arg] = true }
|
62
|
+
elsif v.is_a?(TrueClass) || v.is_a?(FalseClass)
|
63
|
+
{ before: v, after: v }
|
64
|
+
elsif v == :before
|
65
|
+
{ before: true, after: false }
|
66
|
+
elsif v == :after
|
67
|
+
{ after: true, before: false }
|
68
|
+
end
|
69
|
+
}
|
73
70
|
|
74
71
|
def allow_downgrade(arg = nil)
|
75
72
|
if !arg.nil?
|
@@ -24,9 +24,7 @@ class Chef
|
|
24
24
|
resource_name :dpkg_package
|
25
25
|
provides :dpkg_package
|
26
26
|
|
27
|
-
description "Use the dpkg_package resource to manage packages for the dpkg platform."
|
28
|
-
" When a package is installed from a local file, it must be added to the"\
|
29
|
-
" node using the remote_file or cookbook_file resources."
|
27
|
+
description "Use the dpkg_package resource to manage packages for the dpkg platform. When a package is installed from a local file, it must be added to the node using the remote_file or cookbook_file resources."
|
30
28
|
|
31
29
|
property :source, [ String, Array, nil ],
|
32
30
|
description: "The path to a package in the local file system."
|
@@ -23,10 +23,7 @@ class Chef
|
|
23
23
|
resource_name :dsc_resource
|
24
24
|
provides :dsc_resource
|
25
25
|
|
26
|
-
description "The dsc_resource resource allows any DSC resource to be used in a"
|
27
|
-
" Chef recipe, as well as any custom resources that have been added"\
|
28
|
-
" to your Windows PowerShell environment. Microsoft frequently adds"\
|
29
|
-
" new resources to the DSC resource collection."
|
26
|
+
description "The dsc_resource resource allows any DSC resource to be used in a Chef recipe, as well as any custom resources that have been added to your Windows PowerShell environment. Microsoft frequently adds new resources to the DSC resource collection."
|
30
27
|
introduced "12.2"
|
31
28
|
|
32
29
|
# This class will check if the object responds to
|
@@ -76,7 +73,7 @@ class Chef
|
|
76
73
|
|
77
74
|
property :module_version, String,
|
78
75
|
introduced: "12.21",
|
79
|
-
description: "The version number of the module to use.
|
76
|
+
description: "The version number of the module to use. PowerShell 5.0.10018.0 (or higher) supports having multiple versions of a module installed. This should be specified along with the module_name."
|
80
77
|
|
81
78
|
def property(property_name, value = nil)
|
82
79
|
if not property_name.is_a?(Symbol)
|