chef 14.4.56 → 14.5.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -1
  3. data/VERSION +1 -1
  4. data/lib/.DS_Store +0 -0
  5. data/lib/chef/.DS_Store +0 -0
  6. data/lib/chef/client.rb +1 -1
  7. data/lib/chef/cookbook_version.rb +2 -2
  8. data/lib/chef/mixin/powershell_out.rb +1 -1
  9. data/lib/chef/node_map.rb +4 -10
  10. data/lib/chef/provider/.DS_Store +0 -0
  11. data/lib/chef/provider/dsc_resource.rb +2 -2
  12. data/lib/chef/provider/dsc_script.rb +4 -4
  13. data/lib/chef/provider/package/powershell.rb +1 -1
  14. data/lib/chef/provider/powershell_script.rb +3 -3
  15. data/lib/chef/provider/script.rb +2 -2
  16. data/lib/chef/resource/apt_package.rb +1 -0
  17. data/lib/chef/resource/apt_repository.rb +1 -1
  18. data/lib/chef/resource/build_essential.rb +38 -38
  19. data/lib/chef/resource/chef_gem.rb +4 -1
  20. data/lib/chef/resource/chocolatey_package.rb +2 -1
  21. data/lib/chef/resource/directory.rb +6 -2
  22. data/lib/chef/resource/dmg_package.rb +1 -4
  23. data/lib/chef/resource/dnf_package.rb +20 -23
  24. data/lib/chef/resource/dpkg_package.rb +1 -3
  25. data/lib/chef/resource/dsc_resource.rb +2 -5
  26. data/lib/chef/resource/dsc_script.rb +1 -8
  27. data/lib/chef/resource/execute.rb +4 -1
  28. data/lib/chef/resource/gem_package.rb +17 -19
  29. data/lib/chef/resource/git.rb +4 -4
  30. data/lib/chef/resource/homebrew_cask.rb +2 -2
  31. data/lib/chef/resource/homebrew_tap.rb +3 -3
  32. data/lib/chef/resource/hostname.rb +4 -4
  33. data/lib/chef/resource/http_request.rb +1 -3
  34. data/lib/chef/resource/ifconfig.rb +1 -1
  35. data/lib/chef/resource/locale.rb +93 -0
  36. data/lib/chef/resource/macos_userdefaults.rb +2 -4
  37. data/lib/chef/resource/macosx_service.rb +2 -3
  38. data/lib/chef/resource/mount.rb +45 -18
  39. data/lib/chef/resource/msu_package.rb +10 -7
  40. data/lib/chef/resource/ohai.rb +2 -4
  41. data/lib/chef/resource/ohai_hint.rb +3 -3
  42. data/lib/chef/resource/openssl_dhparam.rb +5 -5
  43. data/lib/chef/resource/openssl_ec_private_key.rb +5 -5
  44. data/lib/chef/resource/openssl_ec_public_key.rb +5 -5
  45. data/lib/chef/resource/openssl_rsa_private_key.rb +6 -6
  46. data/lib/chef/resource/openssl_rsa_public_key.rb +7 -7
  47. data/lib/chef/resource/openssl_x509_certificate.rb +11 -11
  48. data/lib/chef/resource/openssl_x509_crl.rb +2 -2
  49. data/lib/chef/resource/openssl_x509_request.rb +7 -7
  50. data/lib/chef/resource/osx_profile.rb +13 -8
  51. data/lib/chef/resource/package.rb +26 -8
  52. data/lib/chef/resource/paludis_package.rb +3 -1
  53. data/lib/chef/resource/portage_package.rb +2 -1
  54. data/lib/chef/resource/powershell_package.rb +17 -9
  55. data/lib/chef/resource/powershell_package_source.rb +1 -1
  56. data/lib/chef/resource/reboot.rb +7 -2
  57. data/lib/chef/resource/rhsm_errata_level.rb +1 -3
  58. data/lib/chef/resource/route.rb +1 -1
  59. data/lib/chef/resource/scm.rb +42 -14
  60. data/lib/chef/resource/subversion.rb +7 -0
  61. data/lib/chef/resource/sudo.rb +7 -7
  62. data/lib/chef/resource/swap_file.rb +2 -2
  63. data/lib/chef/resource/sysctl.rb +1 -1
  64. data/lib/chef/resource/systemd_unit.rb +2 -1
  65. data/lib/chef/resource/windows_ad_join.rb +9 -4
  66. data/lib/chef/resource/windows_auto_run.rb +5 -5
  67. data/lib/chef/resource/windows_env.rb +1 -3
  68. data/lib/chef/resource/windows_feature_dism.rb +4 -5
  69. data/lib/chef/resource/windows_font.rb +3 -5
  70. data/lib/chef/resource/windows_package.rb +1 -2
  71. data/lib/chef/resource/windows_printer.rb +7 -9
  72. data/lib/chef/resource/windows_printer_port.rb +1 -1
  73. data/lib/chef/resource/windows_service.rb +26 -21
  74. data/lib/chef/resource/windows_shortcut.rb +4 -4
  75. data/lib/chef/resource/windows_task.rb +82 -36
  76. data/lib/chef/resource/windows_workgroup.rb +101 -0
  77. data/lib/chef/resource/yum_package.rb +30 -20
  78. data/lib/chef/resource/yum_repository.rb +134 -45
  79. data/lib/chef/resource/zypper_package.rb +8 -4
  80. data/lib/chef/resource/zypper_repository.rb +58 -20
  81. data/lib/chef/resource_inspector.rb +5 -3
  82. data/lib/chef/resources.rb +2 -0
  83. data/lib/chef/util/powershell/cmdlet.rb +1 -1
  84. data/lib/chef/version.rb +1 -1
  85. data/spec/functional/resource/dsc_resource_spec.rb +3 -3
  86. data/spec/functional/resource/powershell_script_spec.rb +2 -2
  87. data/spec/functional/win32/crypto_spec.rb +1 -1
  88. data/spec/unit/cookbook_version_file_specificity_spec.rb +20 -0
  89. data/spec/unit/node_map_spec.rb +3 -3
  90. data/spec/unit/platform/query_helpers_spec.rb +4 -4
  91. data/spec/unit/provider/dsc_resource_spec.rb +2 -2
  92. data/spec/unit/provider/dsc_script_spec.rb +1 -1
  93. data/spec/unit/resource/dsc_resource_spec.rb +1 -1
  94. data/spec/unit/resource/locale_spec.rb +60 -0
  95. data/spec/unit/resource/scm_spec.rb +0 -10
  96. data/spec/unit/resource/windows_workgroup_spec.rb +47 -0
  97. data/tasks/dependencies.rb +2 -22
  98. data/tasks/templates/prerelease.md.erb +2 -2
  99. data/tasks/templates/release.md.erb +1 -1
  100. metadata +8 -5
  101. data/tasks/cbgb.rb +0 -84
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 920d213233499ebaf1139781822c11ee3cfecb6a1009cc32bf48f4e2982c6558
4
- data.tar.gz: 1e4ef57ed7418c1eb0f4962432ecdb6367f7bbacdad02aeba12bb1c107328c4a
3
+ metadata.gz: 8b63f0b14b7cff605ffc2cc9ff2a84a53452638e2e246dccce90a71bd09d3624
4
+ data.tar.gz: 0c5e0154e8f3120ea4dcba4072decb4c45c1c850c88084c525d4f4cf809ce762
5
5
  SHA512:
6
- metadata.gz: cbf9dab5941de391fb2b9ecb614473e46998ac3c029daca776fe52e1fa68244087437393a9bc0237052f34b625af4e3f16a687660f2efca7c241c47c1b279b9d
7
- data.tar.gz: 42d09d8dbea598cac992be0afcc5ed6381c0aaff22f78b181a76255890cdbfe763c8c1afeb076f3fc16c3ebb47cae5fddfc2991486ffc770698e3341f0d454c4
6
+ metadata.gz: fbe8e68a50a797bac5cedb67ea5df61fb372019e6c0e111252e3d47ea36b456c85124fa866246f3017062bb1250d7f4178b11121036fe587a329ad30fdffb2fd
7
+ data.tar.gz: ff0ed7f917660b9a156b3e112138e825e89a3d57badead4e48c70e69273cc83d349bc2320db6b4e0ec359f1132639e0961812b23fdbf75168e02675d8ab2930d
data/Rakefile CHANGED
@@ -19,7 +19,6 @@
19
19
 
20
20
  require_relative "tasks/rspec"
21
21
  require_relative "tasks/maintainers"
22
- require_relative "tasks/cbgb"
23
22
  require_relative "tasks/dependencies"
24
23
  require_relative "tasks/announce"
25
24
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 14.4.56
1
+ 14.5.27
Binary file
Binary file
@@ -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
- # TODO it seems like a bad idea to be deletin' other peoples' hashes.
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)}\/[^\/]+\/#{Regexp.escape(dirname)})\/.+$/
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)}\/[^\/]+\/#{Regexp.escape(dirname)}\/(.+)$/, 1]
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
- # Powershell will hang if STDIN is redirected
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
  ]
@@ -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} has been loaded from a cookbook. The %{type} %{key} is now
42
- included in Chef and will take precedence over the existing cookbook %{type} in the
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} attempted to load from a cookbook. The %{type} %{key} is now
50
- included in Chef and takes precedence over the existing cookbook %{type}
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
  #
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 Powershell version >= 5.0.10018.0 to use dsc_resource."]
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 Powershell 5.0.10018.0 or higher."]
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
- "Powershell 4.0 or higher was not detected on your system and is required to use the dsc_script resource.",
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 Powershell 4.0 or higher."]
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 = "Powershell #{run_context.node[:languages][:powershell][:version]} was found on the system."
178
+ install_info = "PowerShell #{run_context.node[:languages][:powershell][:version]} was found on the system."
179
179
  else
180
- install_info = "Powershell was not found."
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 Powershell Version required is 5"
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
- # Powershell will hang if STDIN is redirected
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 Powershell, the powershell.exe
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 Powershell, we do some work using the automatic variables
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
@@ -49,9 +49,9 @@ class Chef
49
49
 
50
50
  def load_current_resource
51
51
  super
52
- # @todo Chef-13: change this to an exception
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-13"
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
 
@@ -31,6 +31,7 @@ class Chef
31
31
  desired_state: false
32
32
 
33
33
  property :overwrite_config_files, [TrueClass, FalseClass],
34
+ introduced: "14.0",
34
35
  description: "Overwrite existing config files with those in the package if prompted by apt.",
35
36
  default: false
36
37
 
@@ -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
- declare_resource(:package, %w{ autoconf binutils-doc bison build-essential flex gettext ncurses-dev })
41
+ package %w{ autoconf binutils-doc bison build-essential flex gettext ncurses-dev }
42
42
  when "amazon", "fedora", "rhel"
43
- declare_resource(:package, %w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch })
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
- declare_resource(:package, %w{ gcc44 gcc44-c++ }) if platform_family?("rhel") && node["platform_version"].to_i < 6
46
+ package %w{ gcc44 gcc44-c++ } if platform_family?("rhel") && node["platform_version"].to_i < 6
47
47
  when "freebsd"
48
- declare_resource(:package, "devel/gmake")
49
- declare_resource(:package, "devel/autoconf")
50
- declare_resource(:package, "devel/m4")
51
- declare_resource(:package, "devel/gettext")
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
- declare_resource(:execute, "install XCode Command Line tools") do
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
- declare_resource(:package, "developer/gcc48")
72
- declare_resource(:package, "developer/object-file")
73
- declare_resource(:package, "developer/linker")
74
- declare_resource(:package, "developer/library/lint")
75
- declare_resource(:package, "developer/build/gnu-make")
76
- declare_resource(:package, "system/header")
77
- declare_resource(:package, "system/library/math/header-math")
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
- declare_resource(:package, "autoconf")
85
- declare_resource(:package, "automake")
86
- declare_resource(:package, "bison")
87
- declare_resource(:package, "gnu-coreutils")
88
- declare_resource(:package, "flex")
89
- declare_resource(:package, "gcc") do
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
- declare_resource(:package, "gcc-3")
94
- declare_resource(:package, "gnu-grep")
95
- declare_resource(:package, "gnu-make")
96
- declare_resource(:package, "gnu-patch")
97
- declare_resource(:package, "gnu-tar")
98
- declare_resource(:package, "make")
99
- declare_resource(:package, "pkg-config")
100
- declare_resource(:package, "ucb")
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
- declare_resource(:package, "autoconf")
103
- declare_resource(:package, "binutils")
104
- declare_resource(:package, "build-essential")
105
- declare_resource(:package, "gcc47")
106
- declare_resource(:package, "gmake")
107
- declare_resource(:package, "pkg-config")
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
- declare_resource(:package, %w{ autoconf bison flex gcc gcc-c++ kernel-default-devel make m4 })
110
- declare_resource(:package, %w{ gcc48 gcc48-c++ }) if node["platform_version"].to_i < 12
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], default: false, desired_state: false
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
- property :recursive, [ TrueClass, FalseClass ], default: false
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], coerce: proc { |x| [x].flatten }
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
- Hash,
59
- default: { before: false, after: false },
60
- coerce: proc { |v|
61
- if v.is_a?(Hash)
62
- v
63
- elsif v.is_a?(Array)
64
- v.each_with_object({}) { |arg, obj| obj[arg] = true }
65
- elsif v.is_a?(TrueClass) || v.is_a?(FalseClass)
66
- { before: v, after: v }
67
- elsif v == :before
68
- { before: true, after: false }
69
- elsif v == :after
70
- { after: true, before: false }
71
- end
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. Powershell 5.0.10018.0 (or higher) supports having multiple versions of a module installed. This should be specified along with the module_name."
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)