chef 13.6.4-universal-mingw32 → 13.7.16-universal-mingw32
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 +5 -5
- data/VERSION +1 -1
- data/acceptance/Gemfile +2 -2
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +1 -6
- data/distro/powershell/chef/chef.psm1 +1 -5
- data/lib/chef/api_client.rb +5 -5
- data/lib/chef/api_client_v1.rb +6 -6
- data/lib/chef/application.rb +3 -2
- data/lib/chef/application/knife.rb +4 -0
- data/lib/chef/chef_class.rb +2 -2
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -4
- data/lib/chef/client.rb +3 -3
- data/lib/chef/cookbook/chefignore.rb +4 -0
- data/lib/chef/cookbook/cookbook_collection.rb +2 -2
- data/lib/chef/cookbook/metadata.rb +2 -2
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/deprecated.rb +10 -0
- data/lib/chef/event_dispatch/base.rb +2 -2
- data/lib/chef/http.rb +10 -10
- data/lib/chef/knife.rb +16 -15
- data/lib/chef/knife/configure.rb +12 -36
- data/lib/chef/knife/cookbook_upload.rb +4 -4
- data/lib/chef/knife/core/bootstrap_context.rb +1 -1
- data/lib/chef/knife/core/status_presenter.rb +6 -2
- data/lib/chef/knife/core/ui.rb +1 -1
- data/lib/chef/knife/data_bag_secret_options.rb +1 -1
- data/lib/chef/knife/data_bag_show.rb +1 -1
- data/lib/chef/knife/edit.rb +1 -1
- data/lib/chef/knife/ssh.rb +47 -35
- data/lib/chef/knife/user_create.rb +2 -0
- data/lib/chef/knife/user_delete.rb +2 -0
- data/lib/chef/knife/user_edit.rb +2 -0
- data/lib/chef/knife/user_reregister.rb +2 -0
- data/lib/chef/knife/user_show.rb +2 -0
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/node/attribute.rb +46 -70
- data/lib/chef/node/attribute_collections.rb +5 -5
- data/lib/chef/node/common_api.rb +1 -1
- data/lib/chef/node/immutable_collections.rb +180 -23
- data/lib/chef/node/mixin/state_tracking.rb +6 -6
- data/lib/chef/node_map.rb +63 -45
- data/lib/chef/property.rb +8 -8
- data/lib/chef/provider.rb +9 -3
- data/lib/chef/provider/apt_preference.rb +1 -1
- data/lib/chef/provider/apt_repository.rb +1 -1
- data/lib/chef/provider/apt_update.rb +1 -1
- data/lib/chef/provider/file.rb +1 -1
- data/lib/chef/provider/group/dscl.rb +6 -2
- data/lib/chef/provider/ifconfig.rb +96 -34
- data/lib/chef/provider/launchd.rb +0 -1
- data/lib/chef/provider/log.rb +3 -13
- data/lib/chef/provider/package/dnf.rb +1 -1
- data/lib/chef/provider/package/smartos.rb +2 -2
- data/lib/chef/provider/reboot.rb +12 -0
- data/lib/chef/provider/remote_directory.rb +1 -1
- data/lib/chef/provider/remote_file/http.rb +3 -2
- data/lib/chef/provider/service/solaris.rb +6 -2
- data/lib/chef/provider/systemd_unit.rb +34 -33
- data/lib/chef/provider/user/dscl.rb +1 -1
- data/lib/chef/provider/windows_path.rb +6 -7
- data/lib/chef/provider/windows_task.rb +89 -33
- data/lib/chef/provider/yum_repository.rb +24 -9
- data/lib/chef/resource/apt_package.rb +1 -0
- data/lib/chef/resource/apt_preference.rb +4 -0
- data/lib/chef/resource/apt_repository.rb +4 -0
- data/lib/chef/resource/apt_update.rb +3 -0
- data/lib/chef/resource/bash.rb +4 -0
- data/lib/chef/resource/batch.rb +5 -0
- data/lib/chef/resource/bff_package.rb +4 -0
- data/lib/chef/resource/breakpoint.rb +6 -0
- data/lib/chef/resource/cab_package.rb +6 -6
- data/lib/chef/resource/chef_gem.rb +13 -0
- data/lib/chef/resource/chocolatey_package.rb +4 -6
- data/lib/chef/resource/cookbook_file.rb +13 -15
- data/lib/chef/resource/cron.rb +2 -0
- data/lib/chef/resource/csh.rb +4 -0
- data/lib/chef/resource/directory.rb +8 -26
- data/lib/chef/resource/dnf_package.rb +5 -0
- data/lib/chef/resource/dpkg_package.rb +2 -0
- data/lib/chef/resource/dsc_resource.rb +5 -0
- data/lib/chef/resource/dsc_script.rb +6 -0
- data/lib/chef/resource/env.rb +3 -0
- data/lib/chef/resource/erl_call.rb +5 -0
- data/lib/chef/resource/execute.rb +5 -1
- data/lib/chef/resource/file.rb +2 -1
- data/lib/chef/resource/file/verification.rb +10 -0
- data/lib/chef/resource/freebsd_package.rb +10 -2
- data/lib/chef/resource/gem_package.rb +2 -0
- data/lib/chef/resource/git.rb +2 -0
- data/lib/chef/resource/group.rb +1 -0
- data/lib/chef/resource/homebrew_package.rb +3 -0
- data/lib/chef/resource/http_request.rb +2 -0
- data/lib/chef/resource/ifconfig.rb +23 -150
- data/lib/chef/resource/ips_package.rb +1 -0
- data/lib/chef/resource/ksh.rb +6 -0
- data/lib/chef/resource/launchd.rb +5 -4
- data/lib/chef/resource/link.rb +10 -0
- data/lib/chef/resource/log.rb +19 -46
- data/lib/chef/resource/macports_package.rb +1 -0
- data/lib/chef/resource/mdadm.rb +4 -0
- data/lib/chef/resource/mount.rb +1 -0
- data/lib/chef/resource/msu_package.rb +7 -8
- data/lib/chef/resource/ohai.rb +2 -0
- data/lib/chef/resource/openbsd_package.rb +3 -0
- data/lib/chef/resource/osx_profile.rb +10 -40
- data/lib/chef/resource/package.rb +6 -0
- data/lib/chef/resource/pacman_package.rb +1 -0
- data/lib/chef/resource/paludis_package.rb +3 -0
- data/lib/chef/resource/perl.rb +4 -0
- data/lib/chef/resource/portage_package.rb +1 -0
- data/lib/chef/resource/powershell_package.rb +5 -0
- data/lib/chef/resource/powershell_script.rb +8 -0
- data/lib/chef/resource/python.rb +4 -0
- data/lib/chef/resource/reboot.rb +14 -20
- data/lib/chef/resource/registry_key.rb +1 -0
- data/lib/chef/resource/remote_directory.rb +3 -0
- data/lib/chef/resource/remote_file.rb +2 -0
- data/lib/chef/resource/resource_notification.rb +17 -0
- data/lib/chef/resource/route.rb +1 -0
- data/lib/chef/resource/rpm_package.rb +1 -0
- data/lib/chef/resource/ruby.rb +4 -0
- data/lib/chef/resource/ruby_block.rb +3 -0
- data/lib/chef/resource/script.rb +4 -0
- data/lib/chef/resource/service.rb +1 -0
- data/lib/chef/resource/smartos_package.rb +1 -0
- data/lib/chef/resource/solaris_package.rb +1 -0
- data/lib/chef/resource/subversion.rb +1 -0
- data/lib/chef/resource/systemd_unit.rb +6 -0
- data/lib/chef/resource/template.rb +9 -0
- data/lib/chef/resource/user.rb +1 -0
- data/lib/chef/resource/windows_package.rb +2 -0
- data/lib/chef/resource/windows_path.rb +5 -10
- data/lib/chef/resource/windows_service.rb +3 -0
- data/lib/chef/resource/windows_task.rb +66 -87
- data/lib/chef/resource/yum_repository.rb +26 -22
- data/lib/chef/resource/zypper_package.rb +2 -0
- data/lib/chef/resource/zypper_repository.rb +6 -1
- data/lib/chef/run_context.rb +8 -2
- data/lib/chef/server_api.rb +1 -0
- data/lib/chef/util/selinux.rb +5 -4
- data/lib/chef/version.rb +1 -1
- data/lib/chef/version/platform.rb +18 -0
- data/lib/chef/version_constraint/platform.rb +2 -0
- data/spec/data/client.d_00/02-strings.rb +2 -0
- data/spec/functional/assets/chefinittest +6 -4
- data/spec/functional/knife/ssh_spec.rb +54 -7
- data/spec/functional/resource/bff_spec.rb +3 -3
- data/spec/functional/resource/ifconfig_spec.rb +1 -1
- data/spec/functional/resource/mount_spec.rb +7 -3
- data/spec/functional/resource/user/useradd_spec.rb +4 -4
- data/spec/functional/resource/windows_task_spec.rb +6 -6
- data/spec/functional/win32/security_spec.rb +7 -33
- data/spec/integration/knife/data_bag_show_spec.rb +1 -1
- data/spec/integration/recipes/noop_resource_spec.rb +1 -1
- data/spec/integration/recipes/recipe_dsl_spec.rb +30 -30
- data/spec/integration/recipes/resource_action_spec.rb +2 -2
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +71 -15
- data/spec/spec_helper.rb +19 -0
- data/spec/support/shared/functional/execute_resource.rb +1 -1
- data/spec/support/shared/unit/application_dot_d.rb +2 -0
- data/spec/support/shared/unit/execute_resource.rb +8 -1
- data/spec/support/shared/unit/provider/file.rb +9 -1
- data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +10 -7
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +2 -2
- data/spec/unit/client_spec.rb +1 -1
- data/spec/unit/deprecated_spec.rb +4 -4
- data/spec/unit/http_spec.rb +9 -0
- data/spec/unit/knife/bootstrap_spec.rb +5 -0
- data/spec/unit/knife/configure_spec.rb +10 -60
- data/spec/unit/knife/data_bag_create_spec.rb +40 -2
- data/spec/unit/knife/data_bag_show_spec.rb +16 -2
- data/spec/unit/knife/ssh_spec.rb +85 -39
- data/spec/unit/knife_spec.rb +2 -0
- data/spec/unit/lwrp_spec.rb +5 -3
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +7 -6
- data/spec/unit/node/attribute_spec.rb +55 -24
- data/spec/unit/node/immutable_collections_spec.rb +28 -14
- data/spec/unit/node/vivid_mash_spec.rb +27 -10
- data/spec/unit/node_map_spec.rb +34 -0
- data/spec/unit/property_spec.rb +13 -13
- data/spec/unit/provider/group/dscl_spec.rb +14 -5
- data/spec/unit/provider/ifconfig_spec.rb +10 -3
- data/spec/unit/provider/remote_file/http_spec.rb +23 -19
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +6 -5
- data/spec/unit/provider/user/dscl_spec.rb +26 -0
- data/spec/unit/provider/windows_task_spec.rb +148 -4
- data/spec/unit/provider_spec.rb +1 -1
- data/spec/unit/resource/apt_package_spec.rb +1 -1
- data/spec/unit/resource/bash_spec.rb +8 -10
- data/spec/unit/resource/batch_spec.rb +1 -1
- data/spec/unit/resource/cab_package_spec.rb +19 -1
- data/spec/unit/resource/chef_gem_spec.rb +3 -3
- data/spec/unit/resource/chocolatey_package_spec.rb +10 -10
- data/spec/unit/resource/conditional_spec.rb +2 -2
- data/spec/unit/resource/cookbook_file_spec.rb +24 -30
- data/spec/unit/resource/cron_spec.rb +79 -82
- data/spec/unit/resource/csh_spec.rb +8 -10
- data/spec/unit/resource/deploy_spec.rb +1 -1
- data/spec/unit/resource/directory_spec.rb +28 -31
- data/spec/unit/resource/dnf_package_spec.rb +9 -9
- data/spec/unit/resource/env_spec.rb +7 -7
- data/spec/unit/resource/erl_call_spec.rb +9 -9
- data/spec/unit/resource/execute_spec.rb +6 -6
- data/spec/unit/resource/file/verification_spec.rb +18 -4
- data/spec/unit/resource/file_spec.rb +53 -56
- data/spec/unit/resource/freebsd_package_spec.rb +7 -7
- data/spec/unit/resource/gem_package_spec.rb +1 -1
- data/spec/unit/resource/git_spec.rb +7 -9
- data/spec/unit/resource/group_spec.rb +60 -70
- data/spec/unit/resource/http_request_spec.rb +16 -19
- data/spec/unit/resource/ifconfig_spec.rb +3 -3
- data/spec/unit/resource/ips_package_spec.rb +3 -5
- data/spec/unit/resource/ksh_spec.rb +8 -10
- data/spec/unit/resource/launchd_spec.rb +17 -10
- data/spec/unit/resource/link_spec.rb +53 -53
- data/spec/unit/resource/log_spec.rb +24 -28
- data/spec/unit/resource/mdadm_spec.rb +42 -44
- data/spec/unit/resource/mount_spec.rb +97 -99
- data/spec/unit/resource/msu_package_spec.rb +14 -8
- data/spec/unit/resource/ohai_spec.rb +15 -17
- data/spec/unit/resource/openbsd_package_spec.rb +3 -3
- data/spec/unit/resource/osx_profile_spec.rb +7 -7
- data/spec/unit/resource/package_spec.rb +36 -40
- data/spec/unit/resource/perl_spec.rb +8 -11
- data/spec/unit/resource/portage_package_spec.rb +8 -10
- data/spec/unit/resource/powershell_package_spec.rb +9 -9
- data/spec/unit/resource/python_spec.rb +8 -11
- data/spec/unit/resource/reboot_spec.rb +50 -0
- data/spec/unit/resource/registry_key_spec.rb +84 -98
- data/spec/unit/resource/remote_directory_spec.rb +40 -42
- data/spec/unit/resource/remote_file_spec.rb +78 -80
- data/spec/unit/resource/route_spec.rb +42 -44
- data/spec/unit/resource/rpm_package_spec.rb +5 -7
- data/spec/unit/resource/ruby_block_spec.rb +14 -16
- data/spec/unit/resource/ruby_spec.rb +8 -12
- data/spec/unit/resource/scm_spec.rb +66 -69
- data/spec/unit/resource/script_spec.rb +1 -1
- data/spec/unit/resource/service_spec.rb +80 -83
- data/spec/unit/resource/smartos_package_spec.rb +5 -0
- data/spec/unit/resource/solaris_package_spec.rb +3 -5
- data/spec/unit/resource/subversion_spec.rb +18 -16
- data/spec/unit/resource/systemd_unit_spec.rb +50 -54
- data/spec/unit/resource/template_spec.rb +56 -61
- data/spec/unit/resource/user_spec.rb +47 -53
- data/spec/unit/resource/windows_package_spec.rb +1 -1
- data/spec/unit/resource/windows_path_spec.rb +11 -8
- data/spec/unit/resource/windows_task_spec.rb +129 -33
- data/spec/unit/resource/yum_package_spec.rb +1 -1
- data/spec/unit/resource/yum_repository_spec.rb +61 -8
- data/spec/unit/resource/zypper_repository_spec.rb +17 -18
- data/spec/unit/util/selinux_spec.rb +3 -6
- data/tasks/dependencies.rb +0 -5
- data/tasks/rspec.rb +1 -1
- metadata +7 -19
- data/acceptance/.DS_Store +0 -0
- data/acceptance/.bundle/config +0 -2
- data/acceptance/top-cookbooks/.kitchen.docker.yml +0 -13
- data/acceptance/top-cookbooks/.kitchen.git.yml +0 -11
- data/distro/.DS_Store +0 -0
- data/lib/.DS_Store +0 -0
- data/lib/chef/.DS_Store +0 -0
- data/lib/chef/knife/.DS_Store +0 -0
- data/lib/chef/mixin/.DS_Store +0 -0
- data/spec/.DS_Store +0 -0
- data/spec/functional/.DS_Store +0 -0
- data/spec/support/.DS_Store +0 -0
- data/spec/unit/.DS_Store +0 -0
- data/tasks/.DS_Store +0 -0
@@ -20,6 +20,8 @@ require "chef/resource/package"
|
|
20
20
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
|
+
# Use the gem_package resource to manage gem packages that are only included in recipes. When a package is installed
|
24
|
+
# from a local file, it must be added to the node using the remote_file or cookbook_file resources.
|
23
25
|
class GemPackage < Chef::Resource::Package
|
24
26
|
resource_name :gem_package
|
25
27
|
|
data/lib/chef/resource/git.rb
CHANGED
@@ -20,6 +20,8 @@ require "chef/resource/scm"
|
|
20
20
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
|
+
# Use the git resource to manage source control resources that exist in a git repository. git version 1.6.5 (or higher)
|
24
|
+
# is required to use all of the functionality in the git resource.
|
23
25
|
class Git < Chef::Resource::Scm
|
24
26
|
|
25
27
|
def initialize(name, run_context = nil)
|
data/lib/chef/resource/group.rb
CHANGED
@@ -23,6 +23,9 @@ require "chef/resource/package"
|
|
23
23
|
|
24
24
|
class Chef
|
25
25
|
class Resource
|
26
|
+
# Use the homebrew_package resource to manage packages for the macOS platform.
|
27
|
+
#
|
28
|
+
# @since 12.0
|
26
29
|
class HomebrewPackage < Chef::Resource::Package
|
27
30
|
resource_name :homebrew_package
|
28
31
|
provides :package, os: "darwin"
|
@@ -22,6 +22,8 @@ require "chef/provider/http_request"
|
|
22
22
|
|
23
23
|
class Chef
|
24
24
|
class Resource
|
25
|
+
# Use the http_request resource to send an HTTP request (GET, PUT, POST, DELETE, HEAD, or OPTIONS) with an arbitrary
|
26
|
+
# message. This resource is often useful when custom callbacks are necessary.
|
25
27
|
class HttpRequest < Chef::Resource
|
26
28
|
|
27
29
|
identity_attr :url
|
@@ -21,163 +21,36 @@ require "chef/resource"
|
|
21
21
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
|
+
# use the ifconfig resource to manage interfaces on *nix systems
|
25
|
+
#
|
26
|
+
# @example set a static ip on eth1
|
27
|
+
# ifconfig '33.33.33.80' do
|
28
|
+
# device 'eth1'
|
29
|
+
# end
|
24
30
|
class Ifconfig < Chef::Resource
|
25
|
-
|
26
|
-
identity_attr :device
|
31
|
+
resource_name :ifconfig
|
27
32
|
|
28
33
|
state_attrs :inet_addr, :mask
|
29
34
|
|
30
35
|
default_action :add
|
31
36
|
allowed_actions :add, :delete, :enable, :disable
|
32
37
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
@master = nil
|
50
|
-
@slave = nil
|
51
|
-
end
|
52
|
-
|
53
|
-
def target(arg = nil)
|
54
|
-
set_or_return(
|
55
|
-
:target,
|
56
|
-
arg,
|
57
|
-
:kind_of => String
|
58
|
-
)
|
59
|
-
end
|
60
|
-
|
61
|
-
def device(arg = nil)
|
62
|
-
set_or_return(
|
63
|
-
:device,
|
64
|
-
arg,
|
65
|
-
:kind_of => String
|
66
|
-
)
|
67
|
-
end
|
68
|
-
|
69
|
-
def hwaddr(arg = nil)
|
70
|
-
set_or_return(
|
71
|
-
:hwaddr,
|
72
|
-
arg,
|
73
|
-
:kind_of => String
|
74
|
-
)
|
75
|
-
end
|
76
|
-
|
77
|
-
def inet_addr(arg = nil)
|
78
|
-
set_or_return(
|
79
|
-
:inet_addr,
|
80
|
-
arg,
|
81
|
-
:kind_of => String
|
82
|
-
)
|
83
|
-
end
|
84
|
-
|
85
|
-
def bcast(arg = nil)
|
86
|
-
set_or_return(
|
87
|
-
:bcast,
|
88
|
-
arg,
|
89
|
-
:kind_of => String
|
90
|
-
)
|
91
|
-
end
|
92
|
-
|
93
|
-
def mask(arg = nil)
|
94
|
-
set_or_return(
|
95
|
-
:mask,
|
96
|
-
arg,
|
97
|
-
:kind_of => String
|
98
|
-
)
|
99
|
-
end
|
100
|
-
|
101
|
-
def mtu(arg = nil)
|
102
|
-
set_or_return(
|
103
|
-
:mtu,
|
104
|
-
arg,
|
105
|
-
:kind_of => String
|
106
|
-
)
|
107
|
-
end
|
108
|
-
|
109
|
-
def metric(arg = nil)
|
110
|
-
set_or_return(
|
111
|
-
:metric,
|
112
|
-
arg,
|
113
|
-
:kind_of => String
|
114
|
-
)
|
115
|
-
end
|
116
|
-
|
117
|
-
def onboot(arg = nil)
|
118
|
-
set_or_return(
|
119
|
-
:onboot,
|
120
|
-
arg,
|
121
|
-
:kind_of => String
|
122
|
-
)
|
123
|
-
end
|
124
|
-
|
125
|
-
def network(arg = nil)
|
126
|
-
set_or_return(
|
127
|
-
:network,
|
128
|
-
arg,
|
129
|
-
:kind_of => String
|
130
|
-
)
|
131
|
-
end
|
132
|
-
|
133
|
-
def bootproto(arg = nil)
|
134
|
-
set_or_return(
|
135
|
-
:bootproto,
|
136
|
-
arg,
|
137
|
-
:kind_of => String
|
138
|
-
)
|
139
|
-
end
|
140
|
-
|
141
|
-
def onparent(arg = nil)
|
142
|
-
set_or_return(
|
143
|
-
:onparent,
|
144
|
-
arg,
|
145
|
-
:kind_of => String
|
146
|
-
)
|
147
|
-
end
|
148
|
-
|
149
|
-
def ethtool_opts(arg = nil)
|
150
|
-
set_or_return(
|
151
|
-
:ethtool_opts,
|
152
|
-
arg,
|
153
|
-
:kind_of => String
|
154
|
-
)
|
155
|
-
end
|
156
|
-
|
157
|
-
def bonding_opts(arg = nil)
|
158
|
-
set_or_return(
|
159
|
-
:bonding_opts,
|
160
|
-
arg,
|
161
|
-
:kind_of => String
|
162
|
-
)
|
163
|
-
end
|
164
|
-
|
165
|
-
def master(arg = nil)
|
166
|
-
set_or_return(
|
167
|
-
:master,
|
168
|
-
arg,
|
169
|
-
:kind_of => String
|
170
|
-
)
|
171
|
-
end
|
172
|
-
|
173
|
-
def slave(arg = nil)
|
174
|
-
set_or_return(
|
175
|
-
:slave,
|
176
|
-
arg,
|
177
|
-
:kind_of => String
|
178
|
-
)
|
179
|
-
end
|
38
|
+
property :target, String, name_property: true
|
39
|
+
property :hwaddr, String
|
40
|
+
property :mask, String
|
41
|
+
property :inet_addr, String
|
42
|
+
property :bcast, String
|
43
|
+
property :mtu, String
|
44
|
+
property :metric, String
|
45
|
+
property :device, String, identity: true
|
46
|
+
property :onboot, String
|
47
|
+
property :network, String
|
48
|
+
property :bootproto, String
|
49
|
+
property :onparent, String
|
50
|
+
property :ethtool_opts, String
|
51
|
+
property :bonding_opts, String
|
52
|
+
property :master, String
|
53
|
+
property :slave, String
|
180
54
|
end
|
181
|
-
|
182
55
|
end
|
183
56
|
end
|
@@ -21,6 +21,7 @@ require "chef/provider/package/ips"
|
|
21
21
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
|
+
# Use the ips_package resource to manage packages (using Image Packaging System (IPS)) on the Solaris 11 platform.
|
24
25
|
class IpsPackage < ::Chef::Resource::Package
|
25
26
|
resource_name :ips_package
|
26
27
|
provides :package, os: "solaris2"
|
data/lib/chef/resource/ksh.rb
CHANGED
@@ -20,6 +20,12 @@ require "chef/resource/script"
|
|
20
20
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
|
+
# Use the ksh resource to execute scripts using the Korn shell (ksh) interpreter. This resource may also use any
|
24
|
+
# f the actions and properties that are available to the execute resource. Commands that are executed with this
|
25
|
+
# resource are (by their nature) not idempotent, as they are typically unique to the environment in which they are
|
26
|
+
# run. Use not_if and only_if to guard this resource for idempotence.
|
27
|
+
#
|
28
|
+
# @since 12.6
|
23
29
|
class Ksh < Chef::Resource::Script
|
24
30
|
|
25
31
|
def initialize(name, run_context = nil)
|
@@ -17,19 +17,20 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require "chef/resource"
|
20
|
-
require "chef/provider/launchd"
|
21
20
|
|
22
21
|
class Chef
|
23
22
|
class Resource
|
23
|
+
# Use the launchd resource to manage system-wide services (daemons) and per-user services (agents) on the macOS platform.
|
24
|
+
#
|
25
|
+
# @since 12.8
|
24
26
|
class Launchd < Chef::Resource
|
27
|
+
resource_name :launchd
|
25
28
|
provides :launchd, os: "darwin"
|
26
29
|
|
27
|
-
identity_attr :label
|
28
|
-
|
29
30
|
default_action :create
|
30
31
|
allowed_actions :create, :create_if_missing, :delete, :enable, :disable, :restart
|
31
32
|
|
32
|
-
property :label, String,
|
33
|
+
property :label, String, identity: true, name_property: true
|
33
34
|
property :backup, [Integer, FalseClass]
|
34
35
|
property :cookbook, String
|
35
36
|
property :group, [String, Integer]
|
data/lib/chef/resource/link.rb
CHANGED
@@ -22,6 +22,16 @@ require "chef/mixin/securable"
|
|
22
22
|
|
23
23
|
class Chef
|
24
24
|
class Resource
|
25
|
+
# Use the link resource to create symbolic or hard links.
|
26
|
+
#
|
27
|
+
# A symbolic link—sometimes referred to as a soft link—is a directory entry that associates a file name with a string
|
28
|
+
# that contains an absolute or relative path to a file on any file system. In other words, “a file that contains a path
|
29
|
+
# that points to another file.” A symbolic link creates a new file with a new inode that points to the inode location
|
30
|
+
# of the original file.
|
31
|
+
#
|
32
|
+
# A hard link is a directory entry that associates a file with another file in the same file system. In other words,
|
33
|
+
# “multiple directory entries to the same file.” A hard link creates a new file that points to the same inode as the
|
34
|
+
# original file.
|
25
35
|
class Link < Chef::Resource
|
26
36
|
include Chef::Mixin::Securable
|
27
37
|
|
data/lib/chef/resource/log.rb
CHANGED
@@ -18,59 +18,32 @@
|
|
18
18
|
#
|
19
19
|
|
20
20
|
require "chef/resource"
|
21
|
-
require "chef/provider/log"
|
22
21
|
|
23
22
|
class Chef
|
24
23
|
class Resource
|
24
|
+
# Use the log resource to create log entries. The log resource behaves like any other resource: built into the resource
|
25
|
+
# collection during the compile phase, and then run during the execution phase. (To create a log entry that is not built
|
26
|
+
# into the resource collection, use Chef::Log instead of the log resource.)
|
27
|
+
#
|
28
|
+
# Allows logging a :debug, :info, :warn, and :error levels
|
29
|
+
# Defaults to :info level
|
30
|
+
#
|
31
|
+
# @example logging at default info level
|
32
|
+
# log "your string to log"
|
33
|
+
#
|
34
|
+
# @example logging at specified debug level
|
35
|
+
# log "a debug string" do
|
36
|
+
# level :debug
|
37
|
+
# end
|
38
|
+
#
|
25
39
|
class Log < Chef::Resource
|
40
|
+
resource_name :log
|
26
41
|
|
27
|
-
|
42
|
+
property :message, String, name_property: true
|
43
|
+
property :level, Symbol, equal_to: [ :debug, :info, :warn, :error, :fatal ], default: :info
|
28
44
|
|
45
|
+
allowed_actions :write
|
29
46
|
default_action :write
|
30
|
-
|
31
|
-
# Sends a string from a recipe to a log provider
|
32
|
-
#
|
33
|
-
# log "some string to log" do
|
34
|
-
# level :info # (default) also supports :warn, :debug, and :error
|
35
|
-
# end
|
36
|
-
#
|
37
|
-
# === Example
|
38
|
-
# log "your string to log"
|
39
|
-
#
|
40
|
-
# or
|
41
|
-
#
|
42
|
-
# log "a debug string" { level :debug }
|
43
|
-
#
|
44
|
-
|
45
|
-
# Initialize log resource with a name as the string to log
|
46
|
-
#
|
47
|
-
# === Parameters
|
48
|
-
# name<String>:: Message to log
|
49
|
-
# collection<Array>:: Collection of included recipes
|
50
|
-
# node<Chef::Node>:: Node where resource will be used
|
51
|
-
def initialize(name, run_context = nil)
|
52
|
-
super
|
53
|
-
@level = :info
|
54
|
-
@message = name
|
55
|
-
end
|
56
|
-
|
57
|
-
def message(arg = nil)
|
58
|
-
set_or_return(
|
59
|
-
:message,
|
60
|
-
arg,
|
61
|
-
:kind_of => String
|
62
|
-
)
|
63
|
-
end
|
64
|
-
|
65
|
-
# <Symbol> Log level, one of :debug, :info, :warn, :error or :fatal
|
66
|
-
def level(arg = nil)
|
67
|
-
set_or_return(
|
68
|
-
:level,
|
69
|
-
arg,
|
70
|
-
:equal_to => [ :debug, :info, :warn, :error, :fatal ]
|
71
|
-
)
|
72
|
-
end
|
73
|
-
|
74
47
|
end
|
75
48
|
end
|
76
49
|
end
|
data/lib/chef/resource/mdadm.rb
CHANGED
@@ -21,6 +21,10 @@ require "chef/resource"
|
|
21
21
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
|
+
# Use the mdadm resource to manage RAID devices in a Linux environment using the mdadm utility. The mdadm resource
|
25
|
+
# will create and assemble an array, but it will not create the config file that is used to persist the array upon
|
26
|
+
# reboot. If the config file is required, it must be done by specifying a template with the correct array layout,
|
27
|
+
# and then by using the mount provider to create a file systems table (fstab) entry.
|
24
28
|
class Mdadm < Chef::Resource
|
25
29
|
|
26
30
|
identity_attr :raid_device
|
data/lib/chef/resource/mount.rb
CHANGED
@@ -21,26 +21,25 @@ require "chef/mixin/uris"
|
|
21
21
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
|
+
# Use the msu_package resource to install Microsoft Update(MSU) packages on Microsoft Windows machines.
|
25
|
+
#
|
26
|
+
# @since 12.17
|
24
27
|
class MsuPackage < Chef::Resource::Package
|
25
28
|
include Chef::Mixin::Uris
|
26
29
|
|
30
|
+
resource_name :msu_package
|
27
31
|
provides :msu_package, os: "windows"
|
28
32
|
|
29
33
|
allowed_actions :install, :remove
|
30
|
-
|
31
|
-
def initialize(name, run_context = nil)
|
32
|
-
super
|
33
|
-
@resource_name = :msu_package
|
34
|
-
@source = name
|
35
|
-
@action = :install
|
36
|
-
end
|
34
|
+
default_action :install
|
37
35
|
|
38
36
|
property :source, String,
|
39
37
|
coerce: (proc do |s|
|
40
38
|
unless s.nil?
|
41
39
|
uri_scheme?(s) ? s : Chef::Util::PathHelper.canonical_path(s, false)
|
42
40
|
end
|
43
|
-
end)
|
41
|
+
end),
|
42
|
+
default: lazy { |r| r.package_name }
|
44
43
|
property :checksum, String, desired_state: false
|
45
44
|
end
|
46
45
|
end
|
data/lib/chef/resource/ohai.rb
CHANGED
@@ -19,6 +19,8 @@
|
|
19
19
|
|
20
20
|
class Chef
|
21
21
|
class Resource
|
22
|
+
# Use the ohai resource to reload the Ohai configuration on a node. This allows recipes that change system attributes
|
23
|
+
# (like a recipe that adds a user) to refer to those attributes later on during the chef-client run.
|
22
24
|
class Ohai < Chef::Resource
|
23
25
|
resource_name :ohai
|
24
26
|
provides :ohai
|