chef 16.0.257 → 16.0.275

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +30 -16
  3. data/chef.gemspec +1 -1
  4. data/lib/chef/knife/environment_compare.rb +1 -1
  5. data/lib/chef/knife/list.rb +1 -1
  6. data/lib/chef/knife/supermarket_install.rb +1 -1
  7. data/lib/chef/knife/yaml_convert.rb +2 -2
  8. data/lib/chef/provider/execute.rb +1 -1
  9. data/lib/chef/provider/package/freebsd/base.rb +2 -1
  10. data/lib/chef/provider/package/homebrew.rb +1 -1
  11. data/lib/chef/provider/package/macports.rb +0 -2
  12. data/lib/chef/provider/package/windows.rb +26 -51
  13. data/lib/chef/provider/user/dscl.rb +1 -1
  14. data/lib/chef/resource/alternatives.rb +65 -4
  15. data/lib/chef/resource/apt_package.rb +31 -2
  16. data/lib/chef/resource/apt_preference.rb +34 -5
  17. data/lib/chef/resource/apt_repository.rb +22 -15
  18. data/lib/chef/resource/apt_update.rb +6 -4
  19. data/lib/chef/resource/archive_file.rb +5 -4
  20. data/lib/chef/resource/bash.rb +1 -1
  21. data/lib/chef/resource/batch.rb +1 -1
  22. data/lib/chef/resource/bff_package.rb +1 -1
  23. data/lib/chef/resource/breakpoint.rb +1 -1
  24. data/lib/chef/resource/build_essential.rb +8 -4
  25. data/lib/chef/resource/cab_package.rb +1 -1
  26. data/lib/chef/resource/chef_client_cron.rb +12 -9
  27. data/lib/chef/resource/chef_client_scheduled_task.rb +9 -6
  28. data/lib/chef/resource/chef_client_systemd_timer.rb +10 -7
  29. data/lib/chef/resource/chef_gem.rb +6 -2
  30. data/lib/chef/resource/chef_handler.rb +1 -1
  31. data/lib/chef/resource/chef_sleep.rb +7 -4
  32. data/lib/chef/resource/chef_vault_secret.rb +3 -3
  33. data/lib/chef/resource/chocolatey_config.rb +5 -3
  34. data/lib/chef/resource/chocolatey_feature.rb +5 -3
  35. data/lib/chef/resource/chocolatey_package.rb +5 -3
  36. data/lib/chef/resource/chocolatey_source.rb +5 -3
  37. data/lib/chef/resource/cookbook_file.rb +3 -2
  38. data/lib/chef/resource/cron.rb +15 -15
  39. data/lib/chef/resource/cron_access.rb +7 -4
  40. data/lib/chef/resource/cron_d.rb +37 -23
  41. data/lib/chef/resource/csh.rb +1 -1
  42. data/lib/chef/resource/directory.rb +1 -1
  43. data/lib/chef/resource/dmg_package.rb +18 -15
  44. data/lib/chef/resource/dnf_package.rb +1 -1
  45. data/lib/chef/resource/dpkg_package.rb +1 -1
  46. data/lib/chef/resource/execute.rb +2 -2
  47. data/lib/chef/resource/file.rb +5 -4
  48. data/lib/chef/resource/freebsd_package.rb +1 -1
  49. data/lib/chef/resource/gem_package.rb +6 -6
  50. data/lib/chef/resource/group.rb +1 -1
  51. data/lib/chef/resource/homebrew_cask.rb +1 -1
  52. data/lib/chef/resource/homebrew_package.rb +1 -1
  53. data/lib/chef/resource/homebrew_tap.rb +1 -1
  54. data/lib/chef/resource/hostname.rb +4 -4
  55. data/lib/chef/resource/http_request.rb +1 -1
  56. data/lib/chef/resource/ifconfig.rb +7 -7
  57. data/lib/chef/resource/ips_package.rb +1 -1
  58. data/lib/chef/resource/kernel_module.rb +1 -1
  59. data/lib/chef/resource/ksh.rb +1 -1
  60. data/lib/chef/resource/launchd.rb +1 -1
  61. data/lib/chef/resource/link.rb +4 -4
  62. data/lib/chef/resource/locale.rb +1 -1
  63. data/lib/chef/resource/log.rb +1 -1
  64. data/lib/chef/resource/macos_userdefaults.rb +1 -1
  65. data/lib/chef/resource/macosx_service.rb +1 -1
  66. data/lib/chef/resource/macports_package.rb +1 -1
  67. data/lib/chef/resource/mdadm.rb +1 -1
  68. data/lib/chef/resource/mount.rb +1 -1
  69. data/lib/chef/resource/msu_package.rb +1 -1
  70. data/lib/chef/resource/ohai.rb +1 -1
  71. data/lib/chef/resource/ohai_hint.rb +1 -1
  72. data/lib/chef/resource/openbsd_package.rb +1 -1
  73. data/lib/chef/resource/openssl_dhparam.rb +1 -1
  74. data/lib/chef/resource/openssl_ec_private_key.rb +1 -1
  75. data/lib/chef/resource/openssl_ec_public_key.rb +1 -1
  76. data/lib/chef/resource/openssl_rsa_private_key.rb +1 -1
  77. data/lib/chef/resource/openssl_rsa_public_key.rb +1 -1
  78. data/lib/chef/resource/openssl_x509_certificate.rb +1 -1
  79. data/lib/chef/resource/openssl_x509_crl.rb +1 -1
  80. data/lib/chef/resource/openssl_x509_request.rb +1 -1
  81. data/lib/chef/resource/osx_profile.rb +1 -1
  82. data/lib/chef/resource/package.rb +1 -1
  83. data/lib/chef/resource/pacman_package.rb +1 -1
  84. data/lib/chef/resource/paludis_package.rb +1 -1
  85. data/lib/chef/resource/perl.rb +1 -1
  86. data/lib/chef/resource/plist.rb +1 -1
  87. data/lib/chef/resource/portage_package.rb +1 -1
  88. data/lib/chef/resource/powershell_package.rb +1 -1
  89. data/lib/chef/resource/powershell_package_source.rb +1 -1
  90. data/lib/chef/resource/powershell_script.rb +1 -1
  91. data/lib/chef/resource/python.rb +1 -1
  92. data/lib/chef/resource/reboot.rb +1 -1
  93. data/lib/chef/resource/registry_key.rb +1 -1
  94. data/lib/chef/resource/remote_directory.rb +1 -1
  95. data/lib/chef/resource/remote_file.rb +1 -2
  96. data/lib/chef/resource/rhsm_errata.rb +1 -3
  97. data/lib/chef/resource/rhsm_errata_level.rb +1 -1
  98. data/lib/chef/resource/rhsm_register.rb +1 -2
  99. data/lib/chef/resource/rhsm_repo.rb +1 -2
  100. data/lib/chef/resource/rhsm_subscription.rb +1 -3
  101. data/lib/chef/resource/route.rb +1 -1
  102. data/lib/chef/resource/rpm_package.rb +5 -2
  103. data/lib/chef/resource/ruby.rb +1 -1
  104. data/lib/chef/resource/ruby_block.rb +1 -4
  105. data/lib/chef/resource/scm/_scm.rb +4 -3
  106. data/lib/chef/resource/scm/git.rb +1 -1
  107. data/lib/chef/resource/scm/subversion.rb +2 -2
  108. data/lib/chef/resource/script.rb +1 -1
  109. data/lib/chef/resource/service.rb +1 -1
  110. data/lib/chef/resource/smartos_package.rb +1 -1
  111. data/lib/chef/resource/snap_package.rb +1 -1
  112. data/lib/chef/resource/solaris_package.rb +1 -1
  113. data/lib/chef/resource/ssh_known_hosts_entry.rb +1 -1
  114. data/lib/chef/resource/sudo.rb +4 -4
  115. data/lib/chef/resource/swap_file.rb +2 -2
  116. data/lib/chef/resource/sysctl.rb +61 -2
  117. data/lib/chef/resource/systemd_unit.rb +2 -2
  118. data/lib/chef/resource/timezone.rb +1 -1
  119. data/lib/chef/resource/user.rb +2 -2
  120. data/lib/chef/resource/user_ulimit.rb +24 -22
  121. data/lib/chef/resource/windows_ad_join.rb +1 -1
  122. data/lib/chef/resource/windows_auto_run.rb +2 -2
  123. data/lib/chef/resource/windows_certificate.rb +1 -1
  124. data/lib/chef/resource/windows_dfs_folder.rb +1 -1
  125. data/lib/chef/resource/windows_dfs_namespace.rb +1 -1
  126. data/lib/chef/resource/windows_dfs_server.rb +1 -1
  127. data/lib/chef/resource/windows_env.rb +10 -1
  128. data/lib/chef/resource/windows_feature.rb +57 -2
  129. data/lib/chef/resource/windows_feature_dism.rb +15 -2
  130. data/lib/chef/resource/windows_feature_powershell.rb +29 -2
  131. data/lib/chef/resource/windows_firewall_rule.rb +9 -5
  132. data/lib/chef/resource/windows_font.rb +10 -1
  133. data/lib/chef/resource/windows_package.rb +63 -3
  134. data/lib/chef/resource/windows_pagefile.rb +30 -2
  135. data/lib/chef/resource/windows_path.rb +18 -1
  136. data/lib/chef/resource/windows_printer.rb +25 -5
  137. data/lib/chef/resource/windows_printer_port.rb +29 -1
  138. data/lib/chef/resource/windows_security_policy.rb +1 -1
  139. data/lib/chef/resource/windows_service.rb +1 -1
  140. data/lib/chef/resource/windows_share.rb +21 -1
  141. data/lib/chef/resource/windows_shortcut.rb +13 -2
  142. data/lib/chef/resource/windows_task.rb +122 -8
  143. data/lib/chef/resource/windows_uac.rb +20 -1
  144. data/lib/chef/resource/windows_workgroup.rb +19 -3
  145. data/lib/chef/resource/yum_package.rb +88 -6
  146. data/lib/chef/resource/yum_repository.rb +28 -11
  147. data/lib/chef/resource/zypper_package.rb +29 -3
  148. data/lib/chef/resource/zypper_repository.rb +17 -5
  149. data/lib/chef/resource_inspector.rb +1 -1
  150. data/lib/chef/scan_access_control.rb +1 -1
  151. data/lib/chef/version.rb +1 -1
  152. data/spec/functional/resource/link_spec.rb +3 -3
  153. data/spec/functional/resource/remote_file_spec.rb +1 -1
  154. data/spec/integration/knife/raw_spec.rb +4 -4
  155. data/spec/integration/knife/redirection_spec.rb +2 -2
  156. data/spec/support/platform_helpers.rb +0 -13
  157. data/spec/support/shared/functional/http.rb +2 -2
  158. data/spec/support/shared/unit/mock_shellout.rb +1 -1
  159. data/spec/unit/file_access_control_spec.rb +1 -1
  160. data/spec/unit/mixin/shell_out_spec.rb +25 -31
  161. data/spec/unit/provider/apt_repository_spec.rb +27 -27
  162. data/spec/unit/provider/zypper_repository_spec.rb +17 -17
  163. data/spec/unit/provider_resolver_spec.rb +2 -2
  164. metadata +10 -10
@@ -40,7 +40,7 @@ class Chef
40
40
  which("dnf")
41
41
  end
42
42
 
43
- 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."
43
+ 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."
44
44
  introduced "12.18"
45
45
 
46
46
  allowed_actions :install, :upgrade, :remove, :purge, :reconfig, :lock, :unlock, :flush_cache
@@ -25,7 +25,7 @@ class Chef
25
25
 
26
26
  provides :dpkg_package
27
27
 
28
- 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."
28
+ 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."
29
29
 
30
30
  property :source, [ String, Array, nil ],
31
31
  description: "The path to a package in the local file system."
@@ -27,7 +27,7 @@ class Chef
27
27
 
28
28
  provides :execute, target_mode: true
29
29
 
30
- description "Use the execute resource to execute a single command. Commands that"\
30
+ description "Use the **execute** resource to execute a single command. Commands that"\
31
31
  " are executed with this resource are (by their nature) not idempotent,"\
32
32
  " as they are typically unique to the environment in which they are run."\
33
33
  " Use not_if and only_if to guard this resource for idempotence."
@@ -100,7 +100,7 @@ class Chef
100
100
  default: lazy { password ? true : false }, default_description: "True if the password property is set. False otherwise."
101
101
 
102
102
  property :elevated, [ TrueClass, FalseClass ], default: false,
103
- 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::Dist::CLIENT} 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.",
103
+ 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::Dist::CLIENT} 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
104
  introduced: "13.3"
105
105
 
106
106
  alias :env :environment
@@ -32,7 +32,7 @@ class Chef
32
32
 
33
33
  provides :file
34
34
 
35
- description "Use the file resource to manage files directly on a node."
35
+ description "Use the **file** resource to manage files directly on a node."
36
36
 
37
37
  if ChefUtils.windows?
38
38
  # Use Windows rights instead of standard *nix permissions
@@ -59,10 +59,11 @@ class Chef
59
59
  description: "The full path to the file, including the file name and its extension. For example: /files/file.txt. Default value: the name of the resource block. Microsoft Windows: A path that begins with a forward slash (/) will point to the root of the current working directory of the #{Chef::Dist::CLIENT} process. This path can vary from system to system. Therefore, using a path that begins with a forward slash (/) is not recommended."
60
60
 
61
61
  property :atomic_update, [ TrueClass, FalseClass ], desired_state: false, default: lazy { docker? && special_docker_files?(path) ? false : Chef::Config[:file_atomic_update] },
62
- description: "Perform atomic file updates on a per-resource basis. Set to true for atomic file updates. Set to false for non-atomic file updates. This setting overrides file_atomic_update, which is a global setting found in the client.rb file."
62
+ default_description: "False if modifying /etc/hosts, /etc/hostname, or /etc/resolv.conf within Docker containers. Otherwise default to the client.rb 'file_atomic_update' config value.",
63
+ description: "Perform atomic file updates on a per-resource basis. Set to true for atomic file updates. Set to false for non-atomic file updates. This setting overrides `file_atomic_update`, which is a global setting found in the `client.rb` file."
63
64
 
64
65
  property :backup, [ Integer, FalseClass ], desired_state: false, default: 5,
65
- description: "The number of backups to be kept in /var/chef/backup (for UNIX- and Linux-based platforms) or C:/chef/backup (for the Microsoft Windows platform). Set to false to prevent backups from being kept."
66
+ description: "The number of backups to be kept in `/var/chef/backup` (for UNIX- and Linux-based platforms) or `C:/chef/backup` (for the Microsoft Windows platform). Set to `false` to prevent backups from being kept."
66
67
 
67
68
  property :checksum, [ /^[a-zA-Z0-9]{64}$/, nil ],
68
69
  description: "The SHA-256 checksum of the file. Use to ensure that a specific file is used. If the checksum does not match, the file is not used."
@@ -73,7 +74,7 @@ class Chef
73
74
  property :diff, [ String, nil ], desired_state: false, skip_docs: true
74
75
 
75
76
  property :force_unlink, [ TrueClass, FalseClass ], desired_state: false, default: false,
76
- description: "How the #{Chef::Dist::CLIENT} handles certain situations when the target file turns out not to be a file. For example, when a target file is actually a symlink. Set to true for the #{Chef::Dist::CLIENT} delete the non-file target and replace it with the specified file. Set to false for the #{Chef::Dist::CLIENT} to raise an error."
77
+ description: "How #{Chef::Dist::PRODUCT} handles certain situations when the target file turns out not to be a file. For example, when a target file is actually a symlink. Set to true for #{Chef::Dist::PRODUCT} to delete the non-file target and replace it with the specified file. Set to false for #{Chef::Dist::PRODUCT} to raise an error."
77
78
 
78
79
  property :manage_symlink_source, [ TrueClass, FalseClass ], desired_state: false,
79
80
  description: "Change the behavior of the file resource if it is pointed at a symlink. When this value is set to true, #{Chef::Dist::PRODUCT} will manage the symlink's permissions or will replace the symlink with a normal file if the resource has content. When this value is set to false, #{Chef::Dist::PRODUCT} will follow the symlink and will manage the permissions and content of symlink's target file. The default behavior is true but emits a warning that the default value will be changed to false in a future version; setting this explicitly to true or false suppresses this warning."
@@ -29,7 +29,7 @@ class Chef
29
29
  provides :freebsd_package
30
30
  provides :package, platform: "freebsd"
31
31
 
32
- description "Use the freebsd_package resource to manage packages for the FreeBSD platform."
32
+ description "Use the **freebsd_package** resource to manage packages for the FreeBSD platform."
33
33
 
34
34
  # make sure we assign the appropriate underlying providers based on what
35
35
  # package managers exist on this FreeBSD system or the source of the package
@@ -25,7 +25,7 @@ class Chef
25
25
  unified_mode true
26
26
  provides :gem_package
27
27
 
28
- 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."
28
+ 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."
29
29
 
30
30
  property :package_name, String,
31
31
  description: "An optional property to set the package name if it differs from the resource block's name.",
@@ -46,21 +46,21 @@ class Chef
46
46
  # FIXME? the array form of installing paths most likely does not work?
47
47
  #
48
48
  property :source, [ String, Array ],
49
- 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."
49
+ 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."
50
50
 
51
51
  property :clear_sources, [ TrueClass, FalseClass, nil ],
52
- description: "Set to 'true' to download a gem from the path specified by the source property (and not from RubyGems).",
52
+ description: "Set to `true` to download a gem from the path specified by the `source` property (and not from RubyGems).",
53
53
  default: lazy { Chef::Config[:clear_gem_sources] }, desired_state: false
54
54
 
55
55
  property :gem_binary, String, desired_state: false,
56
- 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::Dist::CLIENT} will be installed."
56
+ description: "The path of a gem binary to use for the installation. By default, the same version of Ruby that is used by #{Chef::Dist::PRODUCT} will be installed."
57
57
 
58
58
  property :include_default_source, [ TrueClass, FalseClass, nil ],
59
- description: "Set to 'false' to not include 'Chef::Config[:rubygems_url]'' in the sources.",
59
+ description: "Set to `false` to not include `Chef::Config[:rubygems_url]` in the sources.",
60
60
  default: nil, introduced: "13.0"
61
61
 
62
62
  property :options, [ String, Hash, Array, nil ],
63
- 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.",
63
+ 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.",
64
64
  desired_state: false
65
65
  end
66
66
  end
@@ -23,7 +23,7 @@ class Chef
23
23
  unified_mode true
24
24
  state_attrs :members
25
25
 
26
- description "Use the group resource to manage a local group."
26
+ description "Use the **group** resource to manage a local group."
27
27
 
28
28
  provides :group
29
29
 
@@ -27,7 +27,7 @@ class Chef
27
27
 
28
28
  provides(:homebrew_cask) { true }
29
29
 
30
- description "Use the homebrew_cask resource to install binaries distributed via the Homebrew package manager."
30
+ description "Use the **homebrew_cask** resource to install binaries distributed via the Homebrew package manager."
31
31
  introduced "14.0"
32
32
 
33
33
  include Chef::Mixin::HomebrewUser
@@ -29,7 +29,7 @@ class Chef
29
29
  provides :homebrew_package
30
30
  provides :package, os: "darwin"
31
31
 
32
- description "Use the homebrew_package resource to manage packages for the macOS platform."
32
+ description "Use the **homebrew_package** resource to manage packages for the macOS platform."
33
33
  introduced "12.0"
34
34
 
35
35
  property :homebrew_user, [ String, Integer ],
@@ -27,7 +27,7 @@ class Chef
27
27
 
28
28
  provides(:homebrew_tap) { true }
29
29
 
30
- description "Use the homebrew_tap resource to add additional formula repositories to the Homebrew package manager."
30
+ description "Use the **homebrew_tap** resource to add additional formula repositories to the Homebrew package manager."
31
31
  introduced "14.0"
32
32
 
33
33
  include Chef::Mixin::HomebrewUser
@@ -23,16 +23,16 @@ class Chef
23
23
 
24
24
  provides :hostname
25
25
 
26
- description "Use the hostname resource to set the system's hostname, configure hostname and hosts config file, and re-run the Ohai hostname plugin so the hostname will be available in subsequent cookbooks."
26
+ description "Use the **hostname** resource to set the system's hostname, configure hostname and hosts config file, and re-run the Ohai hostname plugin so the hostname will be available in subsequent cookbooks."
27
27
  introduced "14.0"
28
28
  examples <<~DOC
29
- Set the hostname using the IP address, as detected by Ohai
29
+ **Set the hostname using the IP address, as detected by Ohai**:
30
30
 
31
31
  ```ruby
32
32
  hostname 'example'
33
33
  ```
34
34
 
35
- Manually specify the hostname and IP address
35
+ **Manually specify the hostname and IP address**:
36
36
 
37
37
  ```ruby
38
38
  hostname 'statically_configured_host' do
@@ -168,7 +168,7 @@ class Chef
168
168
  # older non-systemd RHEL/Fedora derived
169
169
  append_replacing_matching_lines("/etc/sysconfig/network", /^HOSTNAME\s*=/, "HOSTNAME=#{new_resource.hostname}")
170
170
  when ::File.exist?("/etc/HOSTNAME")
171
- # SuSE/OpenSUSE uses /etc/HOSTNAME
171
+ # SuSE/openSUSE uses /etc/HOSTNAME
172
172
  declare_resource(:file, "/etc/HOSTNAME") do
173
173
  content "#{new_resource.hostname}\n"
174
174
  owner "root"
@@ -26,7 +26,7 @@ class Chef
26
26
 
27
27
  provides :http_request
28
28
 
29
- 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."
29
+ 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."
30
30
 
31
31
  default_action :get
32
32
  allowed_actions :get, :patch, :put, :post, :delete, :head, :options
@@ -30,7 +30,7 @@ class Chef
30
30
 
31
31
  provides :ifconfig
32
32
 
33
- description "Use the ifconfig resource to manage interfaces on Unix and Linux systems."
33
+ description "Use the **ifconfig** resource to manage interfaces on Unix and Linux systems."
34
34
 
35
35
  state_attrs :inet_addr, :mask
36
36
 
@@ -45,11 +45,11 @@ class Chef
45
45
  description: "The hardware address for the network interface."
46
46
 
47
47
  property :mask, String,
48
- description: "The decimal representation of the network mask. For example: 255.255.255.0."
48
+ description: "The decimal representation of the network mask. For example: `255.255.255.0`."
49
49
 
50
50
  property :family, String, default: "inet",
51
- introduced: "14.0",
52
- description: "Networking family option for Debian-based systems; for example: inet or inet6."
51
+ introduced: "14.0",
52
+ description: "Networking family option for Debian-based systems; for example: `inet` or `inet6`."
53
53
 
54
54
  property :inet_addr, String,
55
55
  description: "The Internet host address for the network interface."
@@ -81,11 +81,11 @@ class Chef
81
81
 
82
82
  property :ethtool_opts, String,
83
83
  introduced: "13.4",
84
- description: "Options to be passed to ethtool(8). For example: -A eth0 autoneg off rx off tx off."
84
+ description: "Options to be passed to ethtool(8). For example: `-A eth0 autoneg off rx off tx off`."
85
85
 
86
86
  property :bonding_opts, String,
87
87
  introduced: "13.4",
88
- description: "Bonding options to pass via BONDING_OPTS on RHEL and CentOS. For example: mode=active-backup miimon=100."
88
+ description: "Bonding options to pass via `BONDING_OPTS` on RHEL and CentOS. For example: `mode=active-backup miimon=100`."
89
89
 
90
90
  property :master, String,
91
91
  introduced: "13.4",
@@ -93,7 +93,7 @@ class Chef
93
93
 
94
94
  property :slave, String,
95
95
  introduced: "13.4",
96
- description: "When set to yes, this device is controlled by the channel bonding interface that is specified via the master property."
96
+ description: "When set to `yes`, this device is controlled by the channel bonding interface that is specified via the `master` property."
97
97
 
98
98
  property :vlan, String,
99
99
  introduced: "14.4",
@@ -27,7 +27,7 @@ class Chef
27
27
  provides :ips_package
28
28
  provides :package, os: "solaris2"
29
29
 
30
- description "Use the ips_package resource to manage packages (using Image Packaging System (IPS)) on the Solaris 11 platform."
30
+ description "Use the **ips_package** resource to manage packages (using Image Packaging System (IPS)) on the Solaris 11 platform."
31
31
 
32
32
  allowed_actions :install, :remove, :upgrade
33
33
 
@@ -15,7 +15,7 @@ class Chef
15
15
 
16
16
  provides :kernel_module
17
17
 
18
- description "Use the kernel_module resource to manage kernel modules on Linux systems. This resource can load, unload, blacklist, disable, install, and uninstall modules."
18
+ description "Use the **kernel_module** resource to manage kernel modules on Linux systems. This resource can load, unload, blacklist, disable, install, and uninstall modules."
19
19
  introduced "14.3"
20
20
  examples <<~DOC
21
21
  Install and load a kernel module, and ensure it loads on reboot.
@@ -25,7 +25,7 @@ class Chef
25
25
 
26
26
  provides :ksh
27
27
 
28
- description "Use the ksh resource to execute scripts using the Korn shell (ksh)"\
28
+ description "Use the **ksh** resource to execute scripts using the Korn shell (ksh)"\
29
29
  " interpreter. This resource may also use any of the actions and properties"\
30
30
  " that are available to the execute resource. Commands that are executed"\
31
31
  " with this resource are (by their nature) not idempotent, as they are"\
@@ -24,7 +24,7 @@ class Chef
24
24
  unified_mode true
25
25
  provides :launchd
26
26
 
27
- description "Use the launchd resource to manage system-wide services (daemons) and per-user services (agents) on the macOS platform."
27
+ description "Use the **launchd** resource to manage system-wide services (daemons) and per-user services (agents) on the macOS platform."
28
28
  introduced "12.8"
29
29
 
30
30
  default_action :create
@@ -28,14 +28,14 @@ class Chef
28
28
 
29
29
  provides :link
30
30
 
31
- description "Use the link resource to create symbolic or hard links.\n\n"\
31
+ description "Use the **link** resource to create symbolic or hard links.\n\n"\
32
32
  "A symbolic link—sometimes referred to as a soft link—is a directory entry"\
33
33
  " that associates a file name with a string that contains an absolute or"\
34
- " relative path to a file on any file system. In other words, a file that"\
35
- " contains a path that points to another file.” A symbolic link creates a new"\
34
+ " relative path to a file on any file system. In other words, 'a file that"\
35
+ " contains a path that points to another file.' A symbolic link creates a new"\
36
36
  " file with a new inode that points to the inode location of the original file.\n\n"\
37
37
  "A hard link is a directory entry that associates a file with another file in the"\
38
- " same file system. In other words, multiple directory entries to the same file.”"\
38
+ " same file system. In other words, 'multiple directory entries to the same file.'"\
39
39
  " A hard link creates a new file that points to the same inode as the original file."
40
40
 
41
41
  state_attrs :owner # required since it's not a property below
@@ -24,7 +24,7 @@ class Chef
24
24
  unified_mode true
25
25
  provides :locale
26
26
 
27
- description "Use the locale resource to set the system's locale on Debian and Windows systems. Windows support was added in Chef Infra Client 16.0"
27
+ description "Use the **locale** resource to set the system's locale on Debian and Windows systems. Windows support was added in Chef Infra Client 16.0"
28
28
  introduced "14.5"
29
29
 
30
30
  examples <<~DOC
@@ -33,7 +33,7 @@ class Chef
33
33
 
34
34
  provides :log, target_mode: true
35
35
 
36
- description "Use the log resource to create log entries. The log resource behaves"\
36
+ description "Use the **log** resource to create log entries. The log resource behaves"\
37
37
  " like any other resource: built into the resource collection during the"\
38
38
  " compile phase, and then run during the execution phase. (To create a log"\
39
39
  " entry that is not built into the resource collection, use Chef::Log instead"\
@@ -26,7 +26,7 @@ class Chef
26
26
  provides(:macos_userdefaults) { true }
27
27
  provides(:mac_os_x_userdefaults) { true }
28
28
 
29
- 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."
29
+ 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."
30
30
  introduced "14.0"
31
31
 
32
32
  property :domain, String,
@@ -26,7 +26,7 @@ class Chef
26
26
  provides :macosx_service
27
27
  provides :service, os: "darwin"
28
28
 
29
- description "Use the macosx_service resource to manage services on the macOS platform."
29
+ description "Use the **macosx_service** resource to manage services on the macOS platform."
30
30
 
31
31
  property :plist, String,
32
32
  description: "A plist to use in the case where the filename and label for the service do not match."
@@ -24,7 +24,7 @@ class Chef
24
24
  unified_mode true
25
25
  provides :macports_package
26
26
 
27
- description "Use the macports_package resource to manage packages for the macOS platform using the MacPorts package management system."
27
+ description "Use the **macports_package** resource to manage packages for the macOS platform using the MacPorts package management system."
28
28
 
29
29
  property :package_name, String,
30
30
  description: "An optional property to set the package name if it differs from the resource block's name.",
@@ -26,7 +26,7 @@ class Chef
26
26
 
27
27
  provides :mdadm
28
28
 
29
- description "Use the mdadm resource to manage RAID devices in a Linux environment using the mdadm utility. The mdadm resource"\
29
+ description "Use the **mdadm** resource to manage RAID devices in a Linux environment using the mdadm utility. The mdadm resource"\
30
30
  " will create and assemble an array, but it will not create the config file that is used to persist the array upon"\
31
31
  " reboot. If the config file is required, it must be done by specifying a template with the correct array layout,"\
32
32
  " and then by using the mount provider to create a file systems table (fstab) entry."
@@ -22,7 +22,7 @@ require_relative "../resource"
22
22
  class Chef
23
23
  class Resource
24
24
  class Mount < Chef::Resource
25
- description "Use the mount resource to manage a mounted file system."
25
+ description "Use the **mount** resource to manage a mounted file system."
26
26
  unified_mode true
27
27
 
28
28
  provides :mount
@@ -27,7 +27,7 @@ class Chef
27
27
 
28
28
  provides :msu_package
29
29
 
30
- description "Use the msu_package resource to install Microsoft Update(MSU) packages on Microsoft Windows machines."
30
+ description "Use the **msu_package** resource to install Microsoft Update(MSU) packages on Microsoft Windows machines."
31
31
  introduced "12.17"
32
32
 
33
33
  allowed_actions :install, :remove
@@ -29,7 +29,7 @@ class Chef
29
29
 
30
30
  provides :ohai
31
31
 
32
- 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::Dist::CLIENT} run."
32
+ 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::Dist::CLIENT} run."
33
33
 
34
34
  property :plugin, String,
35
35
  description: "The name of an Ohai plugin to be reloaded. If this property is not specified, #{Chef::Dist::PRODUCT} will reload all plugins."
@@ -24,7 +24,7 @@ class Chef
24
24
 
25
25
  provides(:ohai_hint) { true }
26
26
 
27
- description "Use the ohai_hint resource to aid in configuration detection by passing hint data to Ohai."
27
+ description "Use the **ohai_hint** resource to aid in configuration detection by passing hint data to Ohai."
28
28
  introduced "14.0"
29
29
 
30
30
  property :hint_name, String,
@@ -29,7 +29,7 @@ class Chef
29
29
  provides :openbsd_package
30
30
  provides :package, os: "openbsd"
31
31
 
32
- description "Use the openbsd_package resource to manage packages for the OpenBSD platform."
32
+ description "Use the **openbsd_package** resource to manage packages for the OpenBSD platform."
33
33
  introduced "12.1"
34
34
 
35
35
  property :package_name, String,
@@ -25,7 +25,7 @@ class Chef
25
25
 
26
26
  provides(:openssl_dhparam) { true }
27
27
 
28
- description "Use the openssl_dhparam resource to generate dhparam.pem files. If a valid dhparam.pem file is found at the specified location, no new file will be created. If a file is found at the specified location but it is not a valid dhparam file, it will be overwritten."
28
+ description "Use the **openssl_dhparam** resource to generate dhparam.pem files. If a valid dhparam.pem file is found at the specified location, no new file will be created. If a file is found at the specified location but it is not a valid dhparam file, it will be overwritten."
29
29
  introduced "14.0"
30
30
  examples <<~DOC
31
31
  Create a 1024bit dhparam file
@@ -26,7 +26,7 @@ class Chef
26
26
 
27
27
  provides :openssl_ec_private_key
28
28
 
29
- description "Use the openssl_ec_private_key resource to generate an elliptic curve (EC) private key file. If a valid EC key file can be opened at the specified location, no new file will be created. If the EC key file cannot be opened, either because it does not exist or because the password to the EC key file does not match the password in the recipe, then it will be overwritten."
29
+ description "Use the **openssl_ec_private_key** resource to generate an elliptic curve (EC) private key file. If a valid EC key file can be opened at the specified location, no new file will be created. If the EC key file cannot be opened, either because it does not exist or because the password to the EC key file does not match the password in the recipe, then it will be overwritten."
30
30
  introduced "14.4"
31
31
  examples <<~DOC
32
32
  Generate a new ec privatekey with prime256v1 key curve and default des3 cipher
@@ -26,7 +26,7 @@ class Chef
26
26
 
27
27
  provides :openssl_ec_public_key
28
28
 
29
- description "Use the openssl_ec_public_key resource to generate elliptic curve (EC) public key files from a given EC private key."
29
+ description "Use the **openssl_ec_public_key** resource to generate elliptic curve (EC) public key files from a given EC private key."
30
30
  introduced "14.4"
31
31
  examples <<~DOC
32
32
  Generate new ec public key from a private key on disk
@@ -26,7 +26,7 @@ class Chef
26
26
  provides(:openssl_rsa_private_key) { true }
27
27
  provides(:openssl_rsa_key) { true } # legacy cookbook resource name
28
28
 
29
- description "Use the openssl_rsa_private_key resource to generate RSA private key files. If a valid RSA key file can be opened at the specified location, no new file will be created. If the RSA key file cannot be opened, either because it does not exist or because the password to the RSA key file does not match the password in the recipe, it will be overwritten."
29
+ description "Use the **openssl_rsa_private_key** resource to generate RSA private key files. If a valid RSA key file can be opened at the specified location, no new file will be created. If the RSA key file cannot be opened, either because it does not exist or because the password to the RSA key file does not match the password in the recipe, it will be overwritten."
30
30
  introduced "14.0"
31
31
  examples <<~DOC
32
32
  Generate new 2048bit key with the default des3 cipher