chef 18.9.4 → 18.11.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +16 -12
  3. data/README.md +0 -1
  4. data/Rakefile +21 -5
  5. data/chef-universal-mingw-ucrt.gemspec +4 -2
  6. data/chef.gemspec +17 -14
  7. data/lib/chef/application/apply.rb +1 -1
  8. data/lib/chef/application/base.rb +4 -4
  9. data/lib/chef/application/exit_code.rb +1 -1
  10. data/lib/chef/chef_fs/command_line.rb +4 -4
  11. data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +1 -1
  12. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +2 -3
  13. data/lib/chef/client.rb +2 -3
  14. data/lib/chef/compliance/fetcher/chef_server.rb +1 -1
  15. data/lib/chef/compliance/reporter/cli.rb +2 -2
  16. data/lib/chef/compliance/runner.rb +19 -1
  17. data/lib/chef/dsl/chef_vault.rb +1 -1
  18. data/lib/chef/dsl/rest_resource.rb +223 -16
  19. data/lib/chef/encrypted_data_bag_item/decryptor.rb +1 -5
  20. data/lib/chef/environment.rb +1 -1
  21. data/lib/chef/exceptions.rb +1 -1
  22. data/lib/chef/file_cache.rb +1 -5
  23. data/lib/chef/formatters/error_description.rb +8 -1
  24. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +1 -1
  25. data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +1 -1
  26. data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +1 -1
  27. data/lib/chef/group.rb +1 -1
  28. data/lib/chef/handler/slow_report.rb +1 -1
  29. data/lib/chef/http/authenticator.rb +25 -12
  30. data/lib/chef/mixin/api_version_request_handling.rb +1 -1
  31. data/lib/chef/mixin/powershell_type_coercions.rb +2 -2
  32. data/lib/chef/mixin/securable.rb +2 -2
  33. data/lib/chef/mixin/template.rb +25 -3
  34. data/lib/chef/mixin/versioned_api.rb +1 -1
  35. data/lib/chef/monkey_patches/net-http.rb +8 -8
  36. data/lib/chef/monkey_patches/reline-windows.rb +116 -0
  37. data/lib/chef/property.rb +1 -1
  38. data/lib/chef/provider/cron.rb +1 -1
  39. data/lib/chef/provider/directory.rb +11 -0
  40. data/lib/chef/provider/dsc_resource.rb +2 -2
  41. data/lib/chef/provider/file/content.rb +3 -2
  42. data/lib/chef/provider/file.rb +1 -1
  43. data/lib/chef/provider/git.rb +1 -1
  44. data/lib/chef/provider/ifconfig/debian.rb +1 -1
  45. data/lib/chef/provider/ifconfig/redhat.rb +1 -1
  46. data/lib/chef/provider/mount/linux.rb +1 -1
  47. data/lib/chef/provider/mount/windows.rb +4 -4
  48. data/lib/chef/provider/package/chocolatey.rb +78 -19
  49. data/lib/chef/provider/package/dnf/dnf_helper.py +355 -65
  50. data/lib/chef/provider/package/dnf/python_helper.rb +7 -4
  51. data/lib/chef/provider/package/dnf.rb +25 -6
  52. data/lib/chef/provider/package/homebrew.rb +3 -3
  53. data/lib/chef/provider/package/rubygems.rb +25 -2
  54. data/lib/chef/provider/package/snap.rb +1 -1
  55. data/lib/chef/provider/package/windows/exe.rb +1 -1
  56. data/lib/chef/provider/package/windows/msi.rb +1 -1
  57. data/lib/chef/provider/package/yum/rpm_utils.rb +2 -2
  58. data/lib/chef/provider/package/yum.rb +1 -1
  59. data/lib/chef/provider/powershell_script.rb +84 -84
  60. data/lib/chef/provider/service/debian.rb +2 -4
  61. data/lib/chef/provider/user/dscl.rb +1 -1
  62. data/lib/chef/provider/user/mac.rb +1 -1
  63. data/lib/chef/provider/windows_script.rb +1 -1
  64. data/lib/chef/resource/_rest_resource.rb +9 -7
  65. data/lib/chef/resource/alternatives.rb +41 -41
  66. data/lib/chef/resource/apt_package.rb +31 -31
  67. data/lib/chef/resource/apt_preference.rb +22 -22
  68. data/lib/chef/resource/apt_repository.rb +2 -2
  69. data/lib/chef/resource/archive_file.rb +52 -18
  70. data/lib/chef/resource/bash.rb +129 -129
  71. data/lib/chef/resource/bff_package.rb +15 -15
  72. data/lib/chef/resource/breakpoint.rb +44 -44
  73. data/lib/chef/resource/cab_package.rb +22 -22
  74. data/lib/chef/resource/chef_client_config.rb +251 -89
  75. data/lib/chef/resource/chef_client_cron.rb +18 -18
  76. data/lib/chef/resource/chef_client_launchd.rb +1 -1
  77. data/lib/chef/resource/chef_client_scheduled_task.rb +31 -31
  78. data/lib/chef/resource/chef_client_systemd_timer.rb +16 -16
  79. data/lib/chef/resource/chef_client_trusted_certificate.rb +28 -28
  80. data/lib/chef/resource/chef_handler.rb +107 -107
  81. data/lib/chef/resource/chef_vault_secret.rb +1 -1
  82. data/lib/chef/resource/chocolatey_config.rb +14 -14
  83. data/lib/chef/resource/chocolatey_feature.rb +1 -1
  84. data/lib/chef/resource/chocolatey_installer.rb +60 -42
  85. data/lib/chef/resource/chocolatey_package.rb +1 -1
  86. data/lib/chef/resource/chocolatey_source.rb +15 -15
  87. data/lib/chef/resource/cron/_cron_shared.rb +0 -2
  88. data/lib/chef/resource/cron/cron.rb +70 -70
  89. data/lib/chef/resource/csh.rb +5 -5
  90. data/lib/chef/resource/directory.rb +6 -6
  91. data/lib/chef/resource/dpkg_package.rb +3 -3
  92. data/lib/chef/resource/group.rb +28 -28
  93. data/lib/chef/resource/habitat/habitat_package.rb +80 -80
  94. data/lib/chef/resource/habitat/habitat_sup.rb +93 -95
  95. data/lib/chef/resource/habitat/habitat_sup_systemd.rb +10 -10
  96. data/lib/chef/resource/habitat/habitat_sup_windows.rb +3 -3
  97. data/lib/chef/resource/habitat_config.rb +13 -13
  98. data/lib/chef/resource/habitat_install.rb +17 -17
  99. data/lib/chef/resource/habitat_service.rb +1 -1
  100. data/lib/chef/resource/habitat_user_toml.rb +12 -12
  101. data/lib/chef/resource/helpers/cron_validations.rb +2 -2
  102. data/lib/chef/resource/homebrew_cask.rb +1 -1
  103. data/lib/chef/resource/homebrew_package.rb +20 -20
  104. data/lib/chef/resource/homebrew_tap.rb +1 -1
  105. data/lib/chef/resource/hostname.rb +2 -2
  106. data/lib/chef/resource/http_request.rb +2 -2
  107. data/lib/chef/resource/ifconfig.rb +34 -34
  108. data/lib/chef/resource/inspec_input.rb +37 -37
  109. data/lib/chef/resource/inspec_waiver.rb +63 -63
  110. data/lib/chef/resource/inspec_waiver_file_entry.rb +25 -25
  111. data/lib/chef/resource/ksh.rb +5 -5
  112. data/lib/chef/resource/launchd.rb +2 -2
  113. data/lib/chef/resource/link.rb +8 -8
  114. data/lib/chef/resource/locale.rb +6 -6
  115. data/lib/chef/resource/log.rb +4 -4
  116. data/lib/chef/resource/mdadm.rb +36 -36
  117. data/lib/chef/resource/mount.rb +3 -3
  118. data/lib/chef/resource/msu_package.rb +1 -1
  119. data/lib/chef/resource/ohai.rb +32 -32
  120. data/lib/chef/resource/ohai_hint.rb +24 -24
  121. data/lib/chef/resource/openssl_ec_private_key.rb +2 -2
  122. data/lib/chef/resource/openssl_ec_public_key.rb +2 -2
  123. data/lib/chef/resource/openssl_rsa_private_key.rb +1 -1
  124. data/lib/chef/resource/openssl_rsa_public_key.rb +2 -2
  125. data/lib/chef/resource/openssl_x509_certificate.rb +1 -1
  126. data/lib/chef/resource/openssl_x509_crl.rb +15 -15
  127. data/lib/chef/resource/openssl_x509_request.rb +2 -2
  128. data/lib/chef/resource/osx_profile.rb +54 -54
  129. data/lib/chef/resource/package.rb +6 -6
  130. data/lib/chef/resource/perl.rb +5 -5
  131. data/lib/chef/resource/plist.rb +4 -4
  132. data/lib/chef/resource/powershell_package_source.rb +12 -12
  133. data/lib/chef/resource/python.rb +4 -4
  134. data/lib/chef/resource/reboot.rb +5 -5
  135. data/lib/chef/resource/registry_key.rb +81 -81
  136. data/lib/chef/resource/remote_file.rb +72 -72
  137. data/lib/chef/resource/resource_notification.rb +4 -4
  138. data/lib/chef/resource/rhsm_errata_level.rb +1 -1
  139. data/lib/chef/resource/rhsm_register.rb +2 -2
  140. data/lib/chef/resource/scm/git.rb +79 -79
  141. data/lib/chef/resource/scm/subversion.rb +9 -9
  142. data/lib/chef/resource/script.rb +3 -3
  143. data/lib/chef/resource/selinux_boolean.rb +12 -12
  144. data/lib/chef/resource/selinux_fcontext.rb +21 -21
  145. data/lib/chef/resource/selinux_install.rb +18 -18
  146. data/lib/chef/resource/selinux_login.rb +11 -11
  147. data/lib/chef/resource/selinux_module.rb +16 -16
  148. data/lib/chef/resource/selinux_permissive.rb +9 -9
  149. data/lib/chef/resource/selinux_port.rb +16 -16
  150. data/lib/chef/resource/selinux_state.rb +28 -28
  151. data/lib/chef/resource/selinux_user.rb +14 -14
  152. data/lib/chef/resource/service.rb +5 -5
  153. data/lib/chef/resource/snap_package.rb +16 -16
  154. data/lib/chef/resource/ssh_known_hosts_entry.rb +10 -10
  155. data/lib/chef/resource/sudo.rb +68 -68
  156. data/lib/chef/resource/swap_file.rb +12 -12
  157. data/lib/chef/resource/sysctl.rb +42 -42
  158. data/lib/chef/resource/systemd_unit.rb +38 -38
  159. data/lib/chef/resource/timezone.rb +16 -16
  160. data/lib/chef/resource/user/mac_user.rb +3 -3
  161. data/lib/chef/resource/user.rb +6 -6
  162. data/lib/chef/resource/user_ulimit.rb +22 -22
  163. data/lib/chef/resource/windows_ad_join.rb +25 -25
  164. data/lib/chef/resource/windows_audit_policy.rb +34 -34
  165. data/lib/chef/resource/windows_auto_run.rb +8 -8
  166. data/lib/chef/resource/windows_certificate.rb +20 -20
  167. data/lib/chef/resource/windows_defender.rb +22 -22
  168. data/lib/chef/resource/windows_defender_exclusion.rb +17 -17
  169. data/lib/chef/resource/windows_env.rb +6 -6
  170. data/lib/chef/resource/windows_feature.rb +42 -42
  171. data/lib/chef/resource/windows_feature_dism.rb +8 -8
  172. data/lib/chef/resource/windows_feature_powershell.rb +20 -20
  173. data/lib/chef/resource/windows_firewall_profile.rb +28 -28
  174. data/lib/chef/resource/windows_firewall_rule.rb +47 -47
  175. data/lib/chef/resource/windows_font.rb +7 -7
  176. data/lib/chef/resource/windows_package.rb +59 -59
  177. data/lib/chef/resource/windows_pagefile.rb +29 -29
  178. data/lib/chef/resource/windows_path.rb +12 -12
  179. data/lib/chef/resource/windows_printer.rb +28 -28
  180. data/lib/chef/resource/windows_printer_port.rb +21 -21
  181. data/lib/chef/resource/windows_security_policy.rb +23 -23
  182. data/lib/chef/resource/windows_service.rb +108 -108
  183. data/lib/chef/resource/windows_share.rb +19 -19
  184. data/lib/chef/resource/windows_shortcut.rb +7 -7
  185. data/lib/chef/resource/windows_task.rb +105 -105
  186. data/lib/chef/resource/windows_uac.rb +14 -14
  187. data/lib/chef/resource/windows_update_settings.rb +27 -27
  188. data/lib/chef/resource/windows_user_privilege.rb +59 -59
  189. data/lib/chef/resource/windows_workgroup.rb +12 -12
  190. data/lib/chef/resource/yum_package.rb +1 -1
  191. data/lib/chef/resource/yum_repository.rb +36 -36
  192. data/lib/chef/resource.rb +1 -1
  193. data/lib/chef/resource_collection/resource_set.rb +2 -3
  194. data/lib/chef/resource_inspector.rb +1 -2
  195. data/lib/chef/run_context.rb +2 -2
  196. data/lib/chef/runner.rb +1 -1
  197. data/lib/chef/secret_fetcher/akeyless_vault.rb +0 -1
  198. data/lib/chef/secret_fetcher/hashi_vault.rb +0 -1
  199. data/lib/chef/shell/ext.rb +20 -20
  200. data/lib/chef/shell/shell_session.rb +1 -1
  201. data/lib/chef/shell.rb +7 -0
  202. data/lib/chef/version.rb +1 -1
  203. data/lib/chef/version_constraint.rb +1 -1
  204. data/lib/chef/win32/file/version_info.rb +1 -1
  205. metadata +63 -38
@@ -33,76 +33,76 @@ class Chef
33
33
  description "Use the **cron** resource to manage cron entries for time-based job scheduling. Properties for a schedule will default to * if not provided. The cron resource requires access to a crontab program, typically cron. Warning: The cron resource should only be used to modify an entry in a crontab file. The `cron_d` resource directly manages `cron.d` files. This resource ships in #{ChefUtils::Dist::Infra::PRODUCT} 14.4 or later and can also be found in the [cron](https://github.com/chef-cookbooks/cron) cookbook) for previous #{ChefUtils::Dist::Infra::PRODUCT} releases."
34
34
 
35
35
  examples <<~'DOC'
36
- **Run a program at a specified interval**
37
-
38
- ```ruby
39
- cron 'noop' do
40
- hour '5'
41
- minute '0'
42
- command '/bin/true'
43
- end
44
- ```
45
-
46
- **Run an entry if a folder exists**
47
-
48
- ```ruby
49
- cron 'ganglia_tomcat_thread_max' do
50
- command "/usr/bin/gmetric
51
- -n 'tomcat threads max'
52
- -t uint32
53
- -v '/usr/local/bin/tomcat-stat --thread-max'"
54
- only_if { ::File.exist?('/home/jboss') }
55
- end
56
- ```
57
-
58
- **Run every Saturday, 8:00 AM**
59
-
60
- The following example shows a schedule that will run every hour at 8:00 each Saturday morning, and will then send an email to “admin@example.com” after each run.
61
-
62
- ```ruby
63
- cron 'name_of_cron_entry' do
64
- minute '0'
65
- hour '8'
66
- weekday '6'
67
- mailto 'admin@example.com'
68
- action :create
69
- end
70
- ```
71
-
72
- **Run once a week**
73
-
74
- ```ruby
75
- cron 'cookbooks_report' do
76
- minute '0'
77
- hour '0'
78
- weekday '1'
79
- user 'chefio'
80
- mailto 'sysadmin@example.com'
81
- home '/srv/supermarket/shared/system'
82
- command %W{
83
- cd /srv/supermarket/current &&
84
- env RUBYLIB="/srv/supermarket/current/lib"
85
- RAILS_ASSET_ID=`git rev-parse HEAD` RAILS_ENV="#{rails_env}"
86
- bundle exec rake cookbooks_report
87
- }.join(' ')
88
- action :create
89
- end
90
- ```
91
-
92
- **Run only in November**
93
-
94
- The following example shows a schedule that will run at 8:00 PM, every weekday (Monday through Friday), but only in November:
95
-
96
- ```ruby
97
- cron 'name_of_cron_entry' do
98
- minute '0'
99
- hour '20'
100
- day '*'
101
- month '11'
102
- weekday '1-5'
103
- action :create
104
- end
105
- ```
36
+ **Run a program at a specified interval**
37
+
38
+ ```ruby
39
+ cron 'noop' do
40
+ hour '5'
41
+ minute '0'
42
+ command '/bin/true'
43
+ end
44
+ ```
45
+
46
+ **Run an entry if a folder exists**
47
+
48
+ ```ruby
49
+ cron 'ganglia_tomcat_thread_max' do
50
+ command "/usr/bin/gmetric
51
+ -n 'tomcat threads max'
52
+ -t uint32
53
+ -v '/usr/local/bin/tomcat-stat --thread-max'"
54
+ only_if { ::File.exist?('/home/jboss') }
55
+ end
56
+ ```
57
+
58
+ **Run every Saturday, 8:00 AM**
59
+
60
+ The following example shows a schedule that will run every hour at 8:00 each Saturday morning, and will then send an email to “admin@example.com” after each run.
61
+
62
+ ```ruby
63
+ cron 'name_of_cron_entry' do
64
+ minute '0'
65
+ hour '8'
66
+ weekday '6'
67
+ mailto 'admin@example.com'
68
+ action :create
69
+ end
70
+ ```
71
+
72
+ **Run once a week**
73
+
74
+ ```ruby
75
+ cron 'cookbooks_report' do
76
+ minute '0'
77
+ hour '0'
78
+ weekday '1'
79
+ user 'chefio'
80
+ mailto 'sysadmin@example.com'
81
+ home '/srv/supermarket/shared/system'
82
+ command %W{
83
+ cd /srv/supermarket/current &&
84
+ env RUBYLIB="/srv/supermarket/current/lib"
85
+ RAILS_ASSET_ID=`git rev-parse HEAD` RAILS_ENV="#{rails_env}"
86
+ bundle exec rake cookbooks_report
87
+ }.join(' ')
88
+ action :create
89
+ end
90
+ ```
91
+
92
+ **Run only in November**
93
+
94
+ The following example shows a schedule that will run at 8:00 PM, every weekday (Monday through Friday), but only in November:
95
+
96
+ ```ruby
97
+ cron 'name_of_cron_entry' do
98
+ minute '0'
99
+ hour '20'
100
+ day '*'
101
+ month '11'
102
+ weekday '1-5'
103
+ action :create
104
+ end
105
+ ```
106
106
  DOC
107
107
 
108
108
  state_attrs :minute, :hour, :day, :month, :weekday, :user
@@ -24,11 +24,11 @@ class Chef
24
24
 
25
25
  provides :csh
26
26
 
27
- description "Use the **csh** resource to execute scripts using the csh interpreter."\
28
- " This resource may also use any of the actions and properties that are"\
29
- " available to the **execute** resource. Commands that are executed with this"\
30
- " resource are (by their nature) not idempotent, as they are typically"\
31
- " unique to the environment in which they are run. Use `not_if` and `only_if`"\
27
+ description "Use the **csh** resource to execute scripts using the csh interpreter." \
28
+ " This resource may also use any of the actions and properties that are" \
29
+ " available to the **execute** resource. Commands that are executed with this" \
30
+ " resource are (by their nature) not idempotent, as they are typically" \
31
+ " unique to the environment in which they are run. Use `not_if` and `only_if`" \
32
32
  " to guard this resource for idempotence."
33
33
 
34
34
  def initialize(name, run_context = nil)
@@ -27,11 +27,11 @@ class Chef
27
27
 
28
28
  provides :directory
29
29
 
30
- description "Use the **directory** resource to manage a directory, which is a hierarchy"\
31
- " of folders that comprises all of the information stored on a computer."\
32
- " The root directory is the top-level, under which the rest of the directory"\
33
- " is organized. The directory resource uses the name property to specify the"\
34
- " path to a location in a directory. Typically, permission to access that"\
30
+ description "Use the **directory** resource to manage a directory, which is a hierarchy" \
31
+ " of folders that comprises all of the information stored on a computer." \
32
+ " The root directory is the top-level, under which the rest of the directory" \
33
+ " is organized. The directory resource uses the name property to specify the" \
34
+ " path to a location in a directory. Typically, permission to access that" \
35
35
  " location in the directory is required."
36
36
 
37
37
  state_attrs :group, :mode, :owner
@@ -42,7 +42,7 @@ class Chef
42
42
  allowed_actions :create, :delete
43
43
 
44
44
  property :path, String, name_property: true,
45
- description: "The path to the directory. Using a fully qualified path is recommended, but is not always required."
45
+ description: "The path to the directory. Using a fully qualified path is recommended, but is not always required."
46
46
 
47
47
  property :recursive, [ TrueClass, FalseClass ],
48
48
  description: "Create parent directories recursively, or delete directory and all children recursively. For the owner, group, and mode properties, the value of this property applies only to the leaf directory.",
@@ -38,9 +38,9 @@ class Chef
38
38
  default: {}, desired_state: false
39
39
 
40
40
  property :allow_downgrade, [ TrueClass, FalseClass ],
41
- description: "Allow downgrading a package to satisfy requested version requirements.",
42
- default: true,
43
- desired_state: false
41
+ description: "Allow downgrading a package to satisfy requested version requirements.",
42
+ default: true,
43
+ desired_state: false
44
44
 
45
45
  property :environment, Hash,
46
46
  introduced: "18.8",
@@ -25,27 +25,27 @@ class Chef
25
25
  description "Use the **group** resource to manage a local group."
26
26
 
27
27
  examples <<~EXAMPLES
28
- The following examples demonstrate various approaches for using the **group** resource in recipes:
29
-
30
- Append users to groups:
31
-
32
- ```ruby
33
- group 'www-data' do
34
- action :modify
35
- members 'maintenance'
36
- append true
37
- end
38
- ```
39
-
40
- Add a user to group on the Windows platform:
41
-
42
- ```ruby
43
- group 'Administrators' do
44
- members ['domain\\foo']
45
- append true
46
- action :modify
47
- end
48
- ```
28
+ The following examples demonstrate various approaches for using the **group** resource in recipes:
29
+
30
+ Append users to groups:
31
+
32
+ ```ruby
33
+ group 'www-data' do
34
+ action :modify
35
+ members 'maintenance'
36
+ append true
37
+ end
38
+ ```
39
+
40
+ Add a user to group on the Windows platform:
41
+
42
+ ```ruby
43
+ group 'Administrators' do
44
+ members ['domain\\foo']
45
+ append true
46
+ action :modify
47
+ end
48
+ ```
49
49
  EXAMPLES
50
50
 
51
51
  provides :group
@@ -61,21 +61,21 @@ class Chef
61
61
  description: "The identifier for the group."
62
62
 
63
63
  property :members, [String, Array], default: [],
64
- coerce: proc { |arg| arg.is_a?(String) ? arg.split(/\s*,\s*/) : arg },
65
- description: "Which users should be set or appended to a group. When more than one group member is identified, the list of members should be an array: `members ['user1', 'user2']`."
64
+ coerce: proc { |arg| arg.is_a?(String) ? arg.split(/\s*,\s*/) : arg },
65
+ description: "Which users should be set or appended to a group. When more than one group member is identified, the list of members should be an array: `members ['user1', 'user2']`."
66
66
 
67
67
  property :excluded_members, [String, Array], default: [],
68
- coerce: proc { |arg| arg.is_a?(String) ? arg.split(/\s*,\s*/) : arg },
69
- description: "Remove users from a group. May only be used when `append` is set to `true`."
68
+ coerce: proc { |arg| arg.is_a?(String) ? arg.split(/\s*,\s*/) : arg },
69
+ description: "Remove users from a group. May only be used when `append` is set to `true`."
70
70
 
71
71
  property :append, [ TrueClass, FalseClass ], default: false,
72
- description: "How members should be appended and/or removed from a group. When true, `members` are appended and `excluded_members` are removed. When `false`, group members are reset to the value of the `members` property."
72
+ description: "How members should be appended and/or removed from a group. When true, `members` are appended and `excluded_members` are removed. When `false`, group members are reset to the value of the `members` property."
73
73
 
74
74
  property :system, [ TrueClass, FalseClass ], default: false,
75
- description: "Set to `true` if the group belongs to a system group."
75
+ description: "Set to `true` if the group belongs to a system group."
76
76
 
77
77
  property :non_unique, [ TrueClass, FalseClass ], default: false,
78
- description: "Allow gid duplication. May only be used with the `Groupadd` user resource provider."
78
+ description: "Allow gid duplication. May only be used with the `Groupadd` user resource provider."
79
79
 
80
80
  property :comment, String,
81
81
  introduced: "14.9",
@@ -27,102 +27,102 @@ class Chef
27
27
  description "Use the **habitat_package** to install or remove Chef Habitat packages from Habitat Builder."
28
28
  introduced "17.3"
29
29
  examples <<~DOC
30
- **Install core/redis**
31
-
32
- ```ruby
33
- habitat_package 'core/redis'
34
- ```
35
-
36
- **Install specific version of a package from the unstable channel**
37
-
38
- ```ruby
39
- habitat_package 'core/redis' do
40
- version '3.2.3'
41
- channel 'unstable'
42
- end
43
- ```
44
-
45
- **Install a package with specific version and revision**
46
-
47
- ```ruby
48
- habitat_package 'core/redis' do
49
- version '3.2.3/20160920131015'
50
- end
51
- ```
52
-
53
- **Install a package and force linking it's binary files to the system path**
54
-
55
- ```ruby
56
- habitat_package 'core/nginx' do
57
- binlink :force
58
- end
59
- ```
60
-
61
- **Install a package and link it's binary files to the system path**
62
-
63
- ```ruby
64
- habitat_package 'core/nginx' do
65
- options '--binlink'
66
- end
67
- ```
68
-
69
- **Remove package and all of it's versions**
70
-
71
- ```ruby
72
- habitat_package 'core/nginx'
73
- action :remove
74
- end
75
- ```
76
-
77
- **Remove specified version of a package**
78
-
79
- ```ruby
80
- habitat_package 'core/nginx/3.2.3'
81
- action :remove
82
- end
83
- ```
84
-
85
- **Remove package but retain some versions Note: Only available as of Habitat 1.5.86**
86
-
87
- ```ruby
88
- habitat_package 'core/nginx'
89
- keep_latest '2'
90
- action :remove
91
- end
92
- ```
93
-
94
- ```ruby
95
- **Remove package but keep dependencies**
96
- habitat_package 'core/nginx'
97
- no_deps false
98
- action :remove
99
- end
100
- ```
30
+ **Install core/redis**
31
+
32
+ ```ruby
33
+ habitat_package 'core/redis'
34
+ ```
35
+
36
+ **Install specific version of a package from the unstable channel**
37
+
38
+ ```ruby
39
+ habitat_package 'core/redis' do
40
+ version '3.2.3'
41
+ channel 'unstable'
42
+ end
43
+ ```
44
+
45
+ **Install a package with specific version and revision**
46
+
47
+ ```ruby
48
+ habitat_package 'core/redis' do
49
+ version '3.2.3/20160920131015'
50
+ end
51
+ ```
52
+
53
+ **Install a package and force linking it's binary files to the system path**
54
+
55
+ ```ruby
56
+ habitat_package 'core/nginx' do
57
+ binlink :force
58
+ end
59
+ ```
60
+
61
+ **Install a package and link it's binary files to the system path**
62
+
63
+ ```ruby
64
+ habitat_package 'core/nginx' do
65
+ options '--binlink'
66
+ end
67
+ ```
68
+
69
+ **Remove package and all of it's versions**
70
+
71
+ ```ruby
72
+ habitat_package 'core/nginx'
73
+ action :remove
74
+ end
75
+ ```
76
+
77
+ **Remove specified version of a package**
78
+
79
+ ```ruby
80
+ habitat_package 'core/nginx/3.2.3'
81
+ action :remove
82
+ end
83
+ ```
84
+
85
+ **Remove package but retain some versions Note: Only available as of Habitat 1.5.86**
86
+
87
+ ```ruby
88
+ habitat_package 'core/nginx'
89
+ keep_latest '2'
90
+ action :remove
91
+ end
92
+ ```
93
+
94
+ ```ruby
95
+ **Remove package but keep dependencies**
96
+ habitat_package 'core/nginx'
97
+ no_deps false
98
+ action :remove
99
+ end
100
+ ```
101
101
  DOC
102
102
 
103
103
  property :bldr_url, String, default: "https://bldr.habitat.sh",
104
- description: "The habitat builder url where packages will be downloaded from. **Defaults to public Habitat Builder**"
104
+ description: "The habitat builder url where packages will be downloaded from. **Defaults to public Habitat Builder**"
105
105
 
106
106
  property :channel, String, default: "stable",
107
- description: "The release channel to install your package from."
107
+ description: "The release channel to install your package from."
108
108
 
109
- property :auth_token, String,
110
- description: "Auth token for installing a package from a private organization on Habitat builder."
109
+ property :auth_token, String, sensitive: true,
110
+ description: "Auth token for installing a package from a private organization on Habitat builder."
111
111
 
112
112
  property :binlink, [true, false, :force], default: false,
113
- description: "If habitat should attempt to binlink the package. Acceptable values: `true`, `false`, `:force`. Will fail on binlinking if set to `true` and binary or binlink exists."
113
+ description: "If habitat should attempt to binlink the package. Acceptable values: `true`, `false`, `:force`. Will fail on binlinking if set to `true` and binary or binlink exists."
114
114
 
115
115
  property :options, String,
116
- description: "Pass any additional parameters to the habitat package command."
116
+ description: "Pass any additional parameters to the habitat package command."
117
117
 
118
118
  property :keep_latest, String,
119
- description: "Ability to uninstall while retaining a specified version **This feature only works in Habitat 1.5.86+.**"
119
+ description: "Ability to uninstall while retaining a specified version **This feature only works in Habitat 1.5.86+.**"
120
120
 
121
121
  property :exclude, String,
122
- description: "Identifier of one or more packages that should not be uninstalled. (ex: core/redis, core/busybox-static/1.42.2/21120102031201)"
122
+ description: "Identifier of one or more packages that should not be uninstalled. (ex: core/redis, core/busybox-static/1.42.2/21120102031201)"
123
123
 
124
124
  property :no_deps, [true, false], default: false,
125
- description: "Remove package but retain dependencies."
125
+ description: "Remove package but retain dependencies."
126
126
  end
127
127
  end
128
128
  end