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.
- checksums.yaml +4 -4
- data/Gemfile +16 -12
- data/README.md +0 -1
- data/Rakefile +21 -5
- data/chef-universal-mingw-ucrt.gemspec +4 -2
- data/chef.gemspec +17 -14
- data/lib/chef/application/apply.rb +1 -1
- data/lib/chef/application/base.rb +4 -4
- data/lib/chef/application/exit_code.rb +1 -1
- data/lib/chef/chef_fs/command_line.rb +4 -4
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +2 -3
- data/lib/chef/client.rb +2 -3
- data/lib/chef/compliance/fetcher/chef_server.rb +1 -1
- data/lib/chef/compliance/reporter/cli.rb +2 -2
- data/lib/chef/compliance/runner.rb +19 -1
- data/lib/chef/dsl/chef_vault.rb +1 -1
- data/lib/chef/dsl/rest_resource.rb +223 -16
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +1 -5
- data/lib/chef/environment.rb +1 -1
- data/lib/chef/exceptions.rb +1 -1
- data/lib/chef/file_cache.rb +1 -5
- data/lib/chef/formatters/error_description.rb +8 -1
- data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +1 -1
- data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +1 -1
- data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +1 -1
- data/lib/chef/group.rb +1 -1
- data/lib/chef/handler/slow_report.rb +1 -1
- data/lib/chef/http/authenticator.rb +25 -12
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/mixin/powershell_type_coercions.rb +2 -2
- data/lib/chef/mixin/securable.rb +2 -2
- data/lib/chef/mixin/template.rb +25 -3
- data/lib/chef/mixin/versioned_api.rb +1 -1
- data/lib/chef/monkey_patches/net-http.rb +8 -8
- data/lib/chef/monkey_patches/reline-windows.rb +116 -0
- data/lib/chef/property.rb +1 -1
- data/lib/chef/provider/cron.rb +1 -1
- data/lib/chef/provider/directory.rb +11 -0
- data/lib/chef/provider/dsc_resource.rb +2 -2
- data/lib/chef/provider/file/content.rb +3 -2
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/git.rb +1 -1
- data/lib/chef/provider/ifconfig/debian.rb +1 -1
- data/lib/chef/provider/ifconfig/redhat.rb +1 -1
- data/lib/chef/provider/mount/linux.rb +1 -1
- data/lib/chef/provider/mount/windows.rb +4 -4
- data/lib/chef/provider/package/chocolatey.rb +78 -19
- data/lib/chef/provider/package/dnf/dnf_helper.py +355 -65
- data/lib/chef/provider/package/dnf/python_helper.rb +7 -4
- data/lib/chef/provider/package/dnf.rb +25 -6
- data/lib/chef/provider/package/homebrew.rb +3 -3
- data/lib/chef/provider/package/rubygems.rb +25 -2
- data/lib/chef/provider/package/snap.rb +1 -1
- data/lib/chef/provider/package/windows/exe.rb +1 -1
- data/lib/chef/provider/package/windows/msi.rb +1 -1
- data/lib/chef/provider/package/yum/rpm_utils.rb +2 -2
- data/lib/chef/provider/package/yum.rb +1 -1
- data/lib/chef/provider/powershell_script.rb +84 -84
- data/lib/chef/provider/service/debian.rb +2 -4
- data/lib/chef/provider/user/dscl.rb +1 -1
- data/lib/chef/provider/user/mac.rb +1 -1
- data/lib/chef/provider/windows_script.rb +1 -1
- data/lib/chef/resource/_rest_resource.rb +9 -7
- data/lib/chef/resource/alternatives.rb +41 -41
- data/lib/chef/resource/apt_package.rb +31 -31
- data/lib/chef/resource/apt_preference.rb +22 -22
- data/lib/chef/resource/apt_repository.rb +2 -2
- data/lib/chef/resource/archive_file.rb +52 -18
- data/lib/chef/resource/bash.rb +129 -129
- data/lib/chef/resource/bff_package.rb +15 -15
- data/lib/chef/resource/breakpoint.rb +44 -44
- data/lib/chef/resource/cab_package.rb +22 -22
- data/lib/chef/resource/chef_client_config.rb +251 -89
- data/lib/chef/resource/chef_client_cron.rb +18 -18
- data/lib/chef/resource/chef_client_launchd.rb +1 -1
- data/lib/chef/resource/chef_client_scheduled_task.rb +31 -31
- data/lib/chef/resource/chef_client_systemd_timer.rb +16 -16
- data/lib/chef/resource/chef_client_trusted_certificate.rb +28 -28
- data/lib/chef/resource/chef_handler.rb +107 -107
- data/lib/chef/resource/chef_vault_secret.rb +1 -1
- data/lib/chef/resource/chocolatey_config.rb +14 -14
- data/lib/chef/resource/chocolatey_feature.rb +1 -1
- data/lib/chef/resource/chocolatey_installer.rb +60 -42
- data/lib/chef/resource/chocolatey_package.rb +1 -1
- data/lib/chef/resource/chocolatey_source.rb +15 -15
- data/lib/chef/resource/cron/_cron_shared.rb +0 -2
- data/lib/chef/resource/cron/cron.rb +70 -70
- data/lib/chef/resource/csh.rb +5 -5
- data/lib/chef/resource/directory.rb +6 -6
- data/lib/chef/resource/dpkg_package.rb +3 -3
- data/lib/chef/resource/group.rb +28 -28
- data/lib/chef/resource/habitat/habitat_package.rb +80 -80
- data/lib/chef/resource/habitat/habitat_sup.rb +93 -95
- data/lib/chef/resource/habitat/habitat_sup_systemd.rb +10 -10
- data/lib/chef/resource/habitat/habitat_sup_windows.rb +3 -3
- data/lib/chef/resource/habitat_config.rb +13 -13
- data/lib/chef/resource/habitat_install.rb +17 -17
- data/lib/chef/resource/habitat_service.rb +1 -1
- data/lib/chef/resource/habitat_user_toml.rb +12 -12
- data/lib/chef/resource/helpers/cron_validations.rb +2 -2
- data/lib/chef/resource/homebrew_cask.rb +1 -1
- data/lib/chef/resource/homebrew_package.rb +20 -20
- data/lib/chef/resource/homebrew_tap.rb +1 -1
- data/lib/chef/resource/hostname.rb +2 -2
- data/lib/chef/resource/http_request.rb +2 -2
- data/lib/chef/resource/ifconfig.rb +34 -34
- data/lib/chef/resource/inspec_input.rb +37 -37
- data/lib/chef/resource/inspec_waiver.rb +63 -63
- data/lib/chef/resource/inspec_waiver_file_entry.rb +25 -25
- data/lib/chef/resource/ksh.rb +5 -5
- data/lib/chef/resource/launchd.rb +2 -2
- data/lib/chef/resource/link.rb +8 -8
- data/lib/chef/resource/locale.rb +6 -6
- data/lib/chef/resource/log.rb +4 -4
- data/lib/chef/resource/mdadm.rb +36 -36
- data/lib/chef/resource/mount.rb +3 -3
- data/lib/chef/resource/msu_package.rb +1 -1
- data/lib/chef/resource/ohai.rb +32 -32
- data/lib/chef/resource/ohai_hint.rb +24 -24
- data/lib/chef/resource/openssl_ec_private_key.rb +2 -2
- data/lib/chef/resource/openssl_ec_public_key.rb +2 -2
- data/lib/chef/resource/openssl_rsa_private_key.rb +1 -1
- data/lib/chef/resource/openssl_rsa_public_key.rb +2 -2
- data/lib/chef/resource/openssl_x509_certificate.rb +1 -1
- data/lib/chef/resource/openssl_x509_crl.rb +15 -15
- data/lib/chef/resource/openssl_x509_request.rb +2 -2
- data/lib/chef/resource/osx_profile.rb +54 -54
- data/lib/chef/resource/package.rb +6 -6
- data/lib/chef/resource/perl.rb +5 -5
- data/lib/chef/resource/plist.rb +4 -4
- data/lib/chef/resource/powershell_package_source.rb +12 -12
- data/lib/chef/resource/python.rb +4 -4
- data/lib/chef/resource/reboot.rb +5 -5
- data/lib/chef/resource/registry_key.rb +81 -81
- data/lib/chef/resource/remote_file.rb +72 -72
- data/lib/chef/resource/resource_notification.rb +4 -4
- data/lib/chef/resource/rhsm_errata_level.rb +1 -1
- data/lib/chef/resource/rhsm_register.rb +2 -2
- data/lib/chef/resource/scm/git.rb +79 -79
- data/lib/chef/resource/scm/subversion.rb +9 -9
- data/lib/chef/resource/script.rb +3 -3
- data/lib/chef/resource/selinux_boolean.rb +12 -12
- data/lib/chef/resource/selinux_fcontext.rb +21 -21
- data/lib/chef/resource/selinux_install.rb +18 -18
- data/lib/chef/resource/selinux_login.rb +11 -11
- data/lib/chef/resource/selinux_module.rb +16 -16
- data/lib/chef/resource/selinux_permissive.rb +9 -9
- data/lib/chef/resource/selinux_port.rb +16 -16
- data/lib/chef/resource/selinux_state.rb +28 -28
- data/lib/chef/resource/selinux_user.rb +14 -14
- data/lib/chef/resource/service.rb +5 -5
- data/lib/chef/resource/snap_package.rb +16 -16
- data/lib/chef/resource/ssh_known_hosts_entry.rb +10 -10
- data/lib/chef/resource/sudo.rb +68 -68
- data/lib/chef/resource/swap_file.rb +12 -12
- data/lib/chef/resource/sysctl.rb +42 -42
- data/lib/chef/resource/systemd_unit.rb +38 -38
- data/lib/chef/resource/timezone.rb +16 -16
- data/lib/chef/resource/user/mac_user.rb +3 -3
- data/lib/chef/resource/user.rb +6 -6
- data/lib/chef/resource/user_ulimit.rb +22 -22
- data/lib/chef/resource/windows_ad_join.rb +25 -25
- data/lib/chef/resource/windows_audit_policy.rb +34 -34
- data/lib/chef/resource/windows_auto_run.rb +8 -8
- data/lib/chef/resource/windows_certificate.rb +20 -20
- data/lib/chef/resource/windows_defender.rb +22 -22
- data/lib/chef/resource/windows_defender_exclusion.rb +17 -17
- data/lib/chef/resource/windows_env.rb +6 -6
- data/lib/chef/resource/windows_feature.rb +42 -42
- data/lib/chef/resource/windows_feature_dism.rb +8 -8
- data/lib/chef/resource/windows_feature_powershell.rb +20 -20
- data/lib/chef/resource/windows_firewall_profile.rb +28 -28
- data/lib/chef/resource/windows_firewall_rule.rb +47 -47
- data/lib/chef/resource/windows_font.rb +7 -7
- data/lib/chef/resource/windows_package.rb +59 -59
- data/lib/chef/resource/windows_pagefile.rb +29 -29
- data/lib/chef/resource/windows_path.rb +12 -12
- data/lib/chef/resource/windows_printer.rb +28 -28
- data/lib/chef/resource/windows_printer_port.rb +21 -21
- data/lib/chef/resource/windows_security_policy.rb +23 -23
- data/lib/chef/resource/windows_service.rb +108 -108
- data/lib/chef/resource/windows_share.rb +19 -19
- data/lib/chef/resource/windows_shortcut.rb +7 -7
- data/lib/chef/resource/windows_task.rb +105 -105
- data/lib/chef/resource/windows_uac.rb +14 -14
- data/lib/chef/resource/windows_update_settings.rb +27 -27
- data/lib/chef/resource/windows_user_privilege.rb +59 -59
- data/lib/chef/resource/windows_workgroup.rb +12 -12
- data/lib/chef/resource/yum_package.rb +1 -1
- data/lib/chef/resource/yum_repository.rb +36 -36
- data/lib/chef/resource.rb +1 -1
- data/lib/chef/resource_collection/resource_set.rb +2 -3
- data/lib/chef/resource_inspector.rb +1 -2
- data/lib/chef/run_context.rb +2 -2
- data/lib/chef/runner.rb +1 -1
- data/lib/chef/secret_fetcher/akeyless_vault.rb +0 -1
- data/lib/chef/secret_fetcher/hashi_vault.rb +0 -1
- data/lib/chef/shell/ext.rb +20 -20
- data/lib/chef/shell/shell_session.rb +1 -1
- data/lib/chef/shell.rb +7 -0
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version_constraint.rb +1 -1
- data/lib/chef/win32/file/version_info.rb +1 -1
- 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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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
|
data/lib/chef/resource/csh.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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",
|
data/lib/chef/resource/group.rb
CHANGED
|
@@ -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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
-
|
|
69
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
-
|
|
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
|
-
|
|
107
|
+
description: "The release channel to install your package from."
|
|
108
108
|
|
|
109
|
-
property :auth_token, String,
|
|
110
|
-
|
|
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
|
-
|
|
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
|
-
|
|
116
|
+
description: "Pass any additional parameters to the habitat package command."
|
|
117
117
|
|
|
118
118
|
property :keep_latest, String,
|
|
119
|
-
|
|
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
|
-
|
|
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
|
-
|
|
125
|
+
description: "Remove package but retain dependencies."
|
|
126
126
|
end
|
|
127
127
|
end
|
|
128
128
|
end
|