chef 14.4.56 → 14.5.27
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
@@ -28,14 +28,7 @@ class Chef
|
|
28
28
|
resource_name :dsc_script
|
29
29
|
provides :dsc_script
|
30
30
|
|
31
|
-
description "Many DSC resources are comparable to built-in Chef resources. For"
|
32
|
-
" example, both DSC and Chef have file, package, and service resources."\
|
33
|
-
" The dsc_script resource is most useful for those DSC resources that"\
|
34
|
-
" do not have a direct comparison to a resource in Chef, such as the"\
|
35
|
-
" Archive resource, a custom DSC resource, an existing DSC script"\
|
36
|
-
" that performs an important task, and so on. Use the dsc_script resource"\
|
37
|
-
" to embed the code that defines a DSC configuration directly within a"\
|
38
|
-
" Chef recipe."
|
31
|
+
description "Many DSC resources are comparable to built-in Chef resources. For example, both DSC and Chef have file, package, and service resources. The dsc_script resource is most useful for those DSC resources that do not have a direct comparison to a resource in Chef, such as the Archive resource, a custom DSC resource, an existing DSC script that performs an important task, and so on. Use the dsc_script resource to embed the code that defines a DSC configuration directly within a Chef recipe."
|
39
32
|
|
40
33
|
default_action :run
|
41
34
|
|
@@ -98,9 +98,12 @@ class Chef
|
|
98
98
|
description: "Windows only: The password of the user specified by the user property. This property is mandatory if user is specified on Windows and may only be specified if user is specified. The sensitive property for this resource will automatically be set to true if password is specified."
|
99
99
|
|
100
100
|
# lazy used to set default value of sensitive to true if password is set
|
101
|
-
property :sensitive, [ TrueClass, FalseClass ],
|
101
|
+
property :sensitive, [ TrueClass, FalseClass ],
|
102
|
+
description: "Ensure that sensitive resource data is not logged by the chef-client.",
|
103
|
+
default: lazy { |r| r.password ? true : false }
|
102
104
|
|
103
105
|
property :elevated, [ TrueClass, FalseClass ], default: false,
|
106
|
+
description: "Determines whether the script will run with elevated permissions to circumvent User Access Control (UAC) interactively blocking the process.\nThis will cause the process to be run under a batch login instead of an interactive login. The user running Chef needs the “Replace a process level token” and “Adjust Memory Quotas for a process” permissions. The user that is running the command needs the “Log on as a batch job” permission.\nBecause this requires a login, the user and password properties are required.",
|
104
107
|
introduced: "13.3"
|
105
108
|
|
106
109
|
def self.set_guard_inherited_attributes(*inherited_attributes)
|
@@ -23,10 +23,7 @@ class Chef
|
|
23
23
|
class GemPackage < Chef::Resource::Package
|
24
24
|
resource_name :gem_package
|
25
25
|
|
26
|
-
description "Use the gem_package resource to manage gem packages that are only"
|
27
|
-
" included in recipes. When a package is installed from a local file,"\
|
28
|
-
" it must be added to the node using the remote_file or cookbook_file"\
|
29
|
-
" resources."
|
26
|
+
description "Use the gem_package resource to manage gem packages that are only included in recipes. 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
27
|
|
31
28
|
# the source can either be a path to a package source like:
|
32
29
|
# source /var/tmp/mygem-1.2.3.4.gem
|
@@ -39,22 +36,23 @@ class Chef
|
|
39
36
|
#
|
40
37
|
# FIXME? the array form of installing paths most likely does not work?
|
41
38
|
#
|
42
|
-
property :source, [ String, Array ]
|
43
|
-
|
44
|
-
# Sets a custom gem_binary to run for gem commands.
|
45
|
-
property :gem_binary, String, desired_state: false
|
46
|
-
|
47
|
-
# set to false to avoid including Chef::Config[:rubygems_url] in the sources
|
48
|
-
property :include_default_source, [ TrueClass, FalseClass ], default: true
|
49
|
-
|
50
|
-
##
|
51
|
-
# Options for the gem install, either a Hash or a String. When a hash is
|
52
|
-
# given, the options are passed to Gem::DependencyInstaller.new, and the
|
53
|
-
# gem will be installed via the gems API. When a String is given, the gem
|
54
|
-
# will be installed by shelling out to the gem command. Using a Hash of
|
55
|
-
# options with an explicit gem_binary will result in undefined behavior.
|
56
|
-
property :options, [ String, Hash, Array, nil ], desired_state: false
|
39
|
+
property :source, [ String, Array ],
|
40
|
+
description: "Optional. The URL, or list of URLs, at which the gem package is located. This list is added to the source configured in Chef::Config[:rubygems_url] (see also include_default_source) to construct the complete list of rubygems sources. Users in an 'airgapped' environment should set Chef::Config[:rubygems_url] to their local RubyGems mirror."
|
57
41
|
|
42
|
+
property :clear_sources, [ TrueClass, FalseClass ],
|
43
|
+
description: "Set to 'true' to download a gem from the path specified by the source property (and not from RubyGems).",
|
44
|
+
default: lazy { Chef::Config[:clear_gem_sources] }, desired_state: false
|
45
|
+
|
46
|
+
property :gem_binary, String, desired_state: false,
|
47
|
+
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."
|
48
|
+
|
49
|
+
property :include_default_source, [ TrueClass, FalseClass ],
|
50
|
+
description: "Set to 'false' to not include 'Chef::Config[:rubygems_url]'' in the sources.",
|
51
|
+
default: true, introduced: "13.0"
|
52
|
+
|
53
|
+
property :options, [ String, Hash, Array, nil ],
|
54
|
+
description: "Options for the gem install, either a Hash or a String. When a hash is given, the options are passed to Gem::DependencyInstaller.new, and the gem will be installed via the gems API. When a String is given, the gem will be installed by shelling out to the gem command. Using a Hash of options with an explicit gem_binary will result in undefined behavior.",
|
55
|
+
desired_state: false
|
58
56
|
end
|
59
57
|
end
|
60
58
|
end
|
data/lib/chef/resource/git.rb
CHANGED
@@ -21,11 +21,11 @@ require "chef/resource/scm"
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Git < Chef::Resource::Scm
|
24
|
-
description "Use the git resource to manage source control resources that exist"
|
25
|
-
" in a git repository. git version 1.6.5 (or higher) is required to"\
|
26
|
-
" use all of the functionality in the git resource."
|
24
|
+
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."
|
27
25
|
|
28
|
-
property :additional_remotes, Hash,
|
26
|
+
property :additional_remotes, Hash,
|
27
|
+
description: "A Hash of additional remotes that are added to the git repository configuration.",
|
28
|
+
default: lazy { Hash.new }
|
29
29
|
|
30
30
|
alias :branch :revision
|
31
31
|
alias :reference :revision
|
@@ -32,7 +32,7 @@ class Chef
|
|
32
32
|
include Chef::Mixin::HomebrewUser
|
33
33
|
|
34
34
|
property :cask_name, String,
|
35
|
-
description: "
|
35
|
+
description: "The name of the Homebrew cask, if it differs from the resource block name.",
|
36
36
|
regex: %r{^[\w/-]+$},
|
37
37
|
name_property: true
|
38
38
|
|
@@ -40,7 +40,7 @@ class Chef
|
|
40
40
|
description: "Options to pass to the brew CLI during installation."
|
41
41
|
|
42
42
|
property :install_cask, [TrueClass, FalseClass],
|
43
|
-
description: "
|
43
|
+
description: "Automatically install the Homebrew cask tap, if necessary.",
|
44
44
|
default: true
|
45
45
|
|
46
46
|
property :homebrew_path, String,
|
@@ -41,15 +41,15 @@ class Chef
|
|
41
41
|
description: "URL to the tap."
|
42
42
|
|
43
43
|
property :full, [TrueClass, FalseClass],
|
44
|
-
description: "Perform a full clone
|
44
|
+
description: "Perform a full clone on the tap, as opposed to a shallow clone.",
|
45
45
|
default: false
|
46
46
|
|
47
47
|
property :homebrew_path, String,
|
48
|
-
description: "The path to the
|
48
|
+
description: "The path to the Homebrew binary.",
|
49
49
|
default: "/usr/local/bin/brew"
|
50
50
|
|
51
51
|
property :owner, String,
|
52
|
-
description: "The owner of the
|
52
|
+
description: "The owner of the Homebrew installation.",
|
53
53
|
default: lazy { find_homebrew_username }
|
54
54
|
|
55
55
|
action :tap do
|
@@ -27,15 +27,15 @@ class Chef
|
|
27
27
|
introduced "14.0"
|
28
28
|
|
29
29
|
property :hostname, String,
|
30
|
-
description: "
|
30
|
+
description: "Used to specify the hostname if it is different than the resource’s name.",
|
31
31
|
name_property: true
|
32
32
|
|
33
33
|
property :compile_time, [ TrueClass, FalseClass ],
|
34
|
-
description: "
|
34
|
+
description: "Determines whether or not the resource shoul be run at compile time.",
|
35
35
|
default: true
|
36
36
|
|
37
37
|
property :ipaddress, String,
|
38
|
-
description: "The
|
38
|
+
description: "The IP address to use when configuring the hosts file.",
|
39
39
|
default: lazy { node["ipaddress"] }
|
40
40
|
|
41
41
|
property :aliases, [ Array, nil ],
|
@@ -43,7 +43,7 @@ class Chef
|
|
43
43
|
default: nil
|
44
44
|
|
45
45
|
property :windows_reboot, [ TrueClass, FalseClass ],
|
46
|
-
description: "
|
46
|
+
description: "Determines whether or not Windows should be reboot after changing the hostname, as this is required for the change to take effect.",
|
47
47
|
default: true
|
48
48
|
|
49
49
|
action_class do
|
@@ -25,9 +25,7 @@ class Chef
|
|
25
25
|
resource_name :http_request
|
26
26
|
provides :http_request
|
27
27
|
|
28
|
-
description "Use the http_request resource to send an HTTP request (GET, PUT,"
|
29
|
-
" POST, DELETE, HEAD, or OPTIONS) with an arbitrary message. This"\
|
30
|
-
" resource is often useful when custom callbacks are necessary."
|
28
|
+
description "Use the http_request resource to send an HTTP request (GET, PUT, POST, DELETE, HEAD, or OPTIONS) with an arbitrary message. This resource is often useful when custom callbacks are necessary."
|
31
29
|
|
32
30
|
default_action :get
|
33
31
|
allowed_actions :get, :patch, :put, :post, :delete, :head, :options
|
@@ -28,7 +28,7 @@ class Chef
|
|
28
28
|
class Ifconfig < Chef::Resource
|
29
29
|
resource_name :ifconfig
|
30
30
|
|
31
|
-
description "Use the ifconfig resource to manage interfaces on
|
31
|
+
description "Use the ifconfig resource to manage interfaces on Unix and Linux systems."
|
32
32
|
|
33
33
|
state_attrs :inet_addr, :mask
|
34
34
|
|
@@ -0,0 +1,93 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: 2011-2016, Heavy Water Software Inc.
|
3
|
+
# Copyright:: 2016-2018, Chef Software Inc.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific slanguage governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
require "chef/resource"
|
19
|
+
|
20
|
+
class Chef
|
21
|
+
class Resource
|
22
|
+
class Locale < Chef::Resource
|
23
|
+
preview_resource true
|
24
|
+
resource_name :locale
|
25
|
+
|
26
|
+
description "Use the locale resource to set the system's locale."
|
27
|
+
introduced "14.5"
|
28
|
+
|
29
|
+
property :lang, String,
|
30
|
+
default: "en_US.utf8",
|
31
|
+
description: "Sets the default system language."
|
32
|
+
property :lc_all, String,
|
33
|
+
default: "en_US.utf8",
|
34
|
+
description: "Sets the fallback system language."
|
35
|
+
|
36
|
+
action :update do
|
37
|
+
description "Update the system's locale."
|
38
|
+
|
39
|
+
if node["init_package"] == "systemd"
|
40
|
+
# on systemd settings LC_ALL is (correctly) reserved only for testing and cannot be set globally
|
41
|
+
execute "localectl set-locale LANG=#{new_resource.lang}" do
|
42
|
+
# RHEL uses /etc/locale.conf
|
43
|
+
not_if { up_to_date?("/etc/locale.conf", new_resource.lang) } if ::File.exist?("/etc/locale.conf")
|
44
|
+
# Ubuntu 16.04 still uses /etc/default/locale
|
45
|
+
not_if { up_to_date?("/etc/default/locale", new_resource.lang) } if ::File.exist?("/etc/default/locale")
|
46
|
+
end
|
47
|
+
elsif ::File.exist?("/etc/sysconfig/i18n")
|
48
|
+
locale_file_path = "/etc/sysconfig/i18n"
|
49
|
+
|
50
|
+
updated = up_to_date?(locale_file_path, new_resource.lang, new_resource.lc_all)
|
51
|
+
|
52
|
+
file locale_file_path do
|
53
|
+
content lazy {
|
54
|
+
locale = IO.read(locale_file_path)
|
55
|
+
variables = Hash[locale.lines.map { |line| line.strip.split("=") }]
|
56
|
+
variables["LANG"] = new_resource.lang
|
57
|
+
variables["LC_ALL"] =
|
58
|
+
variables.map { |pairs| pairs.join("=") }.join("\n") + "\n"
|
59
|
+
}
|
60
|
+
not_if { updated }
|
61
|
+
end
|
62
|
+
|
63
|
+
execute "reload root's lang profile script" do
|
64
|
+
command "source source /etc/sysconfig/i18n; source /etc/profile.d/lang.sh"
|
65
|
+
not_if { updated }
|
66
|
+
end
|
67
|
+
elsif ::File.exist?("/usr/sbin/update-locale")
|
68
|
+
execute "Generate locales" do
|
69
|
+
command "locale-gen"
|
70
|
+
not_if { up_to_date?("/etc/default/locale", new_resource.lang, new_resource.lc_all) }
|
71
|
+
end
|
72
|
+
|
73
|
+
execute "Update locale" do
|
74
|
+
command "update-locale LANG=#{new_resource.lang} LC_ALL=#{new_resource.lc_all}"
|
75
|
+
not_if { up_to_date?("/etc/default/locale", new_resource.lang, new_resource.lc_all) }
|
76
|
+
end
|
77
|
+
else
|
78
|
+
raise "#{node["platform"]} platform not supported by the chef locale resource."
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
action_class do
|
83
|
+
def up_to_date?(file_path, lang, lc_all = nil)
|
84
|
+
locale = IO.read(file_path)
|
85
|
+
locale.include?("LANG=#{lang}") &&
|
86
|
+
(node["init_package"] == "systemd" || lc_all.nil? || locale.include?("LC_ALL=#{lc_all}"))
|
87
|
+
rescue
|
88
|
+
false
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -25,9 +25,7 @@ class Chef
|
|
25
25
|
provides(:mac_os_x_userdefaults) { true }
|
26
26
|
provides(:macos_userdefaults) { true }
|
27
27
|
|
28
|
-
description "Use the macos_userdefaults resource to manage the macOS user defaults system. The properties"
|
29
|
-
" of this resource are passed to the defaults command, and the parameters follow the convention"\
|
30
|
-
" of that command. See the defaults(1) man page for details on how the tool works."
|
28
|
+
description "Use the macos_userdefaults resource to manage the macOS user defaults system. The properties of this resource are passed to the defaults command, and the parameters follow the convention of that command. See the defaults(1) man page for details on how the tool works."
|
31
29
|
introduced "14.0"
|
32
30
|
|
33
31
|
property :domain, String,
|
@@ -57,8 +55,8 @@ class Chef
|
|
57
55
|
default: false,
|
58
56
|
desired_state: false
|
59
57
|
|
58
|
+
# @todo this should get refactored away: https://github.com/chef/chef/issues/7622
|
60
59
|
property :is_set, [TrueClass, FalseClass],
|
61
|
-
description: "",
|
62
60
|
default: false,
|
63
61
|
desired_state: false
|
64
62
|
|
@@ -31,9 +31,8 @@ class Chef
|
|
31
31
|
|
32
32
|
state_attrs :enabled, :running
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
property :plist, String
|
34
|
+
property :plist, String,
|
35
|
+
description: "A plist to use in the case where the filename and label for the service do not match."
|
37
36
|
|
38
37
|
property :session_type, String
|
39
38
|
|
data/lib/chef/resource/mount.rb
CHANGED
@@ -29,32 +29,59 @@ class Chef
|
|
29
29
|
|
30
30
|
# this is a poor API please do not re-use this pattern
|
31
31
|
property :supports, Hash,
|
32
|
-
|
33
|
-
|
32
|
+
description: "Specify a Hash of supported mount features.",
|
33
|
+
default: lazy { { remount: false } },
|
34
|
+
coerce: proc { |x| x.is_a?(Array) ? x.each_with_object({}) { |i, m| m[i] = true } : x }
|
34
35
|
|
35
|
-
property :password, String,
|
36
|
+
property :password, String,
|
37
|
+
description: "Windows only:. Use to specify the password for username.",
|
38
|
+
sensitive: true
|
36
39
|
|
37
|
-
property :mount_point, String, name_property: true
|
38
|
-
|
40
|
+
property :mount_point, String, name_property: true,
|
41
|
+
description: "The directory (or path) in which the device is to be mounted. Defaults to the name of the resource block if not provided."
|
42
|
+
|
43
|
+
property :device, String, identity: true,
|
44
|
+
description: "Required for :umount and :remount actions (for the purpose of checking the mount command output for presence). The special block device or remote node, a label, or a uuid to be mounted."
|
39
45
|
|
40
46
|
property :device_type, [String, Symbol],
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
description: "The type of device: :device, :label, or :uuid",
|
48
|
+
coerce: proc { |arg| arg.kind_of?(String) ? arg.to_sym : arg },
|
49
|
+
default: :device,
|
50
|
+
equal_to: RUBY_PLATFORM =~ /solaris/i ? %i{ device } : %i{ device label uuid }
|
51
|
+
|
52
|
+
# @todo this should get refactored away: https://github.com/chef/chef/issues/7621
|
53
|
+
property :mounted, [TrueClass, FalseClass], default: false
|
44
54
|
|
45
|
-
property :fsck_device, String,
|
46
|
-
|
55
|
+
property :fsck_device, String,
|
56
|
+
description: "Solaris only: The fsck device.",
|
57
|
+
default: "-"
|
58
|
+
|
59
|
+
property :fstype, [String, nil],
|
60
|
+
description: "The file system type (fstype) of the device.",
|
61
|
+
default: "auto"
|
47
62
|
|
48
63
|
property :options, [Array, String, nil],
|
49
|
-
|
50
|
-
|
64
|
+
description: "An array or comma separated list of options for the mount.",
|
65
|
+
coerce: proc { |arg| arg.kind_of?(String) ? arg.split(",") : arg },
|
66
|
+
default: %w{defaults}
|
51
67
|
|
52
|
-
property :dump, [Integer, FalseClass],
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
property :
|
57
|
-
|
68
|
+
property :dump, [Integer, FalseClass],
|
69
|
+
description: "The dump frequency (in days) used while creating a file systems table (fstab) entry.",
|
70
|
+
default: 0
|
71
|
+
|
72
|
+
property :pass, [Integer, FalseClass],
|
73
|
+
description: "The pass number used by the file system check (fsck) command while creating a file systems table (fstab) entry.",
|
74
|
+
default: 2
|
75
|
+
|
76
|
+
property :enabled, [TrueClass, FalseClass],
|
77
|
+
description: "Use to specify if a mounted file system is enabled.",
|
78
|
+
default: false
|
79
|
+
|
80
|
+
property :username, String,
|
81
|
+
description: "Windows only: Use to specify the user name."
|
82
|
+
|
83
|
+
property :domain, String,
|
84
|
+
description: "Windows only: Use to specify the domain in which the username and password are located."
|
58
85
|
|
59
86
|
private
|
60
87
|
|
@@ -34,13 +34,16 @@ class Chef
|
|
34
34
|
default_action :install
|
35
35
|
|
36
36
|
property :source, String,
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
37
|
+
description: "The local file path or URL for the MSU package.",
|
38
|
+
coerce: (proc do |s|
|
39
|
+
unless s.nil?
|
40
|
+
uri_scheme?(s) ? s : Chef::Util::PathHelper.canonical_path(s, false)
|
41
|
+
end
|
42
|
+
end),
|
43
|
+
default: lazy { |r| r.package_name }
|
44
|
+
|
45
|
+
property :checksum, String, desired_state: false,
|
46
|
+
description: "SHA-256 digest used to verify the checksum of the downloaded MSU package."
|
44
47
|
end
|
45
48
|
end
|
46
49
|
end
|
data/lib/chef/resource/ohai.rb
CHANGED
@@ -25,11 +25,9 @@ class Chef
|
|
25
25
|
resource_name :ohai
|
26
26
|
provides :ohai
|
27
27
|
|
28
|
-
description "Use the ohai resource to reload the Ohai configuration on a node."
|
29
|
-
" This allows recipes that change system attributes (like a recipe"\
|
30
|
-
" that adds a user) to refer to those attributes later on during the chef-client run."
|
28
|
+
description "Use the ohai resource to reload the Ohai configuration on a node. This allows recipes that change system attributes (like a recipe that adds a user) to refer to those attributes later on during the chef-client run."
|
31
29
|
|
32
|
-
property :ohai_name, name_property: true
|
30
|
+
property :ohai_name, name_property: true, introduced: "12.17"
|
33
31
|
property :plugin, String
|
34
32
|
|
35
33
|
default_action :reload
|
@@ -23,18 +23,18 @@ class Chef
|
|
23
23
|
resource_name :ohai_hint
|
24
24
|
provides(:ohai_hint) { true }
|
25
25
|
|
26
|
-
description "Use the ohai_hint resource to
|
26
|
+
description "Use the ohai_hint resource to aid in configuration detection by passing hint data to Ohai."
|
27
27
|
introduced "14.0"
|
28
28
|
|
29
29
|
property :hint_name, String,
|
30
|
-
description: "The name of hints file if
|
30
|
+
description: "The name of the hints file, if it differs from the resource name.",
|
31
31
|
name_property: true
|
32
32
|
|
33
33
|
property :content, Hash,
|
34
34
|
description: "Values to include in the hint file."
|
35
35
|
|
36
36
|
property :compile_time, [TrueClass, FalseClass],
|
37
|
-
description: "
|
37
|
+
description: "Determines whether or not the resource is executed during the compile time phase.",
|
38
38
|
default: true, desired_state: false
|
39
39
|
|
40
40
|
action :create do
|