chef 11.18.12-x86-mingw32 → 12.0.0.alpha.0-x86-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 +4 -4
- data/CONTRIBUTING.md +10 -0
- data/README.md +1 -1
- data/distro/common/html/_sources/index.txt +5 -2
- data/distro/common/html/_sources/knife_serve.txt +19 -0
- data/distro/common/html/_sources/knife_ssl_check.txt +2 -2
- data/distro/common/html/_sources/knife_ssl_fetch.txt +2 -2
- data/distro/common/html/_static/basic.css +1 -1
- data/distro/common/html/_static/doctools.js +1 -1
- data/distro/common/html/_static/searchtools.js +1 -1
- data/distro/common/html/_static/websupport.js +1 -1
- data/distro/common/html/ctl_chef_client.html +19 -9
- data/distro/common/html/ctl_chef_server.html +7 -1
- data/distro/common/html/ctl_chef_shell.html +3 -4
- data/distro/common/html/ctl_chef_solo.html +12 -7
- data/distro/common/html/index.html +19 -12
- data/distro/common/html/knife.html +1 -2
- data/distro/common/html/knife_bootstrap.html +16 -5
- data/distro/common/html/knife_client.html +8 -5
- data/distro/common/html/knife_common_options.html +11 -12
- data/distro/common/html/knife_configure.html +2 -3
- data/distro/common/html/knife_cookbook.html +16 -17
- data/distro/common/html/knife_cookbook_site.html +19 -18
- data/distro/common/html/knife_data_bag.html +6 -7
- data/distro/common/html/knife_delete.html +2 -3
- data/distro/common/html/knife_deps.html +2 -3
- data/distro/common/html/knife_diff.html +3 -4
- data/distro/common/html/knife_download.html +6 -7
- data/distro/common/html/knife_edit.html +0 -1
- data/distro/common/html/knife_environment.html +3 -4
- data/distro/common/html/knife_exec.html +0 -1
- data/distro/common/html/knife_index_rebuild.html +0 -1
- data/distro/common/html/knife_list.html +5 -6
- data/distro/common/html/knife_node.html +13 -6
- data/distro/common/html/knife_raw.html +0 -1
- data/distro/common/html/knife_recipe_list.html +0 -1
- data/distro/common/html/knife_role.html +1 -2
- data/distro/common/html/knife_search.html +2 -3
- data/distro/common/html/knife_serve.html +79 -0
- data/distro/common/html/knife_show.html +1 -2
- data/distro/common/html/knife_ssh.html +2 -3
- data/distro/common/html/knife_ssl_check.html +12 -9
- data/distro/common/html/knife_ssl_fetch.html +9 -10
- data/distro/common/html/knife_status.html +2 -3
- data/distro/common/html/knife_tag.html +0 -1
- data/distro/common/html/knife_upload.html +3 -4
- data/distro/common/html/knife_user.html +2 -3
- data/distro/common/html/knife_using.html +0 -1
- data/distro/common/html/knife_xargs.html +3 -4
- data/distro/common/html/search.html +0 -1
- data/distro/common/html/searchindex.js +1 -1
- data/lib/chef/api_client.rb +1 -1
- data/lib/chef/application.rb +24 -67
- data/lib/chef/application/client.rb +1 -1
- data/lib/chef/application/knife.rb +1 -1
- data/lib/chef/chef_fs/chef_fs_data_store.rb +2 -3
- data/lib/chef/chef_fs/command_line.rb +2 -3
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +1 -5
- data/lib/chef/chef_fs/file_system/acl_entry.rb +1 -2
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +1 -2
- data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/rest_list_dir.rb +2 -3
- data/lib/chef/chef_fs/file_system/rest_list_entry.rb +4 -5
- data/lib/chef/config.rb +26 -2
- data/lib/chef/config_fetcher.rb +1 -1
- data/lib/chef/cookbook/cookbook_version_loader.rb +4 -4
- data/lib/chef/cookbook/metadata.rb +1 -1
- data/lib/chef/cookbook/synchronizer.rb +50 -8
- data/lib/chef/cookbook_uploader.rb +9 -23
- data/lib/chef/cookbook_version.rb +3 -2
- data/lib/chef/data_bag.rb +1 -1
- data/lib/chef/data_bag_item.rb +1 -1
- data/lib/chef/dsl/recipe.rb +1 -14
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +3 -3
- data/lib/chef/environment.rb +1 -1
- data/lib/chef/exceptions.rb +2 -24
- data/lib/chef/file_content_management/tempfile.rb +8 -1
- data/lib/chef/formatters/base.rb +0 -7
- data/lib/chef/http.rb +12 -19
- data/lib/chef/http/json_input.rb +12 -1
- data/lib/chef/json_compat.rb +45 -64
- data/lib/chef/knife.rb +2 -5
- data/lib/chef/knife/bootstrap.rb +2 -2
- data/lib/chef/knife/bootstrap/archlinux-gems.erb +2 -2
- data/lib/chef/knife/bootstrap/centos5-gems.erb +2 -2
- data/lib/chef/knife/bootstrap/chef-aix.erb +2 -2
- data/lib/chef/knife/bootstrap/chef-full.erb +2 -2
- data/lib/chef/knife/bootstrap/fedora13-gems.erb +2 -2
- data/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +2 -2
- data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +2 -2
- data/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +2 -2
- data/lib/chef/knife/cookbook_site_download.rb +1 -1
- data/lib/chef/knife/cookbook_site_install.rb +10 -34
- data/lib/chef/knife/cookbook_site_list.rb +1 -1
- data/lib/chef/knife/cookbook_site_search.rb +1 -1
- data/lib/chef/knife/cookbook_site_share.rb +3 -3
- data/lib/chef/knife/cookbook_site_show.rb +3 -3
- data/lib/chef/knife/cookbook_site_unshare.rb +1 -1
- data/lib/chef/knife/cookbook_upload.rb +1 -1
- data/lib/chef/knife/core/subcommand_loader.rb +0 -24
- data/lib/chef/knife/core/ui.rb +8 -7
- data/lib/chef/knife/deps.rb +2 -3
- data/lib/chef/knife/serve.rb +2 -1
- data/lib/chef/local_mode.rb +105 -0
- data/lib/chef/mixin/file_class.rb +1 -4
- data/lib/chef/mixin/shell_out.rb +15 -0
- data/lib/chef/mixin/windows_architecture_helper.rb +0 -16
- data/lib/chef/node.rb +1 -1
- data/lib/chef/platform/query_helpers.rb +1 -5
- data/lib/chef/policy_builder/expand_node_object.rb +3 -0
- data/lib/chef/provider.rb +2 -0
- data/lib/chef/provider/cookbook_file.rb +0 -1
- data/lib/chef/provider/deploy.rb +0 -1
- data/lib/chef/provider/deploy/revision.rb +1 -1
- data/lib/chef/provider/env.rb +10 -25
- data/lib/chef/provider/env/windows.rb +23 -10
- data/lib/chef/provider/execute.rb +0 -3
- data/lib/chef/provider/file.rb +0 -3
- data/lib/chef/provider/git.rb +0 -6
- data/lib/chef/provider/group/dscl.rb +9 -27
- data/lib/chef/provider/group/gpasswd.rb +0 -3
- data/lib/chef/provider/group/groupmod.rb +0 -4
- data/lib/chef/provider/group/suse.rb +0 -3
- data/lib/chef/provider/group/usermod.rb +0 -3
- data/lib/chef/provider/link.rb +22 -5
- data/lib/chef/provider/log.rb +15 -4
- data/lib/chef/provider/mdadm.rb +0 -3
- data/lib/chef/provider/mount/mount.rb +0 -2
- data/lib/chef/provider/mount/solaris.rb +0 -2
- data/lib/chef/provider/package.rb +0 -1
- data/lib/chef/provider/package/apt.rb +0 -3
- data/lib/chef/provider/package/dpkg.rb +0 -1
- data/lib/chef/provider/package/easy_install.rb +0 -4
- data/lib/chef/provider/package/freebsd/base.rb +0 -3
- data/lib/chef/provider/package/freebsd/pkgng.rb +0 -2
- data/lib/chef/provider/package/freebsd/port.rb +0 -2
- data/lib/chef/provider/package/ips.rb +0 -3
- data/lib/chef/provider/package/paludis.rb +0 -5
- data/lib/chef/provider/package/portage.rb +0 -2
- data/lib/chef/provider/package/rpm.rb +2 -4
- data/lib/chef/provider/package/rubygems.rb +0 -4
- data/lib/chef/provider/package/smartos.rb +0 -3
- data/lib/chef/provider/package/windows/msi.rb +0 -2
- data/lib/chef/provider/package/yum.rb +0 -4
- data/lib/chef/provider/package/zypper.rb +0 -3
- data/lib/chef/provider/registry_key.rb +0 -2
- data/lib/chef/provider/remote_directory.rb +0 -1
- data/lib/chef/provider/remote_file.rb +0 -1
- data/lib/chef/provider/remote_file/cache_control_data.rb +1 -3
- data/lib/chef/provider/remote_file/content.rb +0 -1
- data/lib/chef/provider/remote_file/fetcher.rb +0 -2
- data/lib/chef/provider/remote_file/ftp.rb +0 -1
- data/lib/chef/provider/resource_update.rb +0 -3
- data/lib/chef/provider/service/freebsd.rb +0 -3
- data/lib/chef/provider/service/init.rb +0 -3
- data/lib/chef/provider/service/macosx.rb +0 -1
- data/lib/chef/provider/service/redhat.rb +0 -2
- data/lib/chef/provider/service/simple.rb +0 -3
- data/lib/chef/provider/service/solaris.rb +0 -3
- data/lib/chef/provider/service/systemd.rb +15 -14
- data/lib/chef/provider/service/windows.rb +0 -3
- data/lib/chef/provider/subversion.rb +0 -2
- data/lib/chef/provider/template.rb +0 -2
- data/lib/chef/provider/template/content.rb +0 -1
- data/lib/chef/provider/user/dscl.rb +156 -549
- data/lib/chef/provider/user/solaris.rb +0 -1
- data/lib/chef/provider/user/useradd.rb +0 -3
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/providers.rb +0 -1
- data/lib/chef/resource.rb +1 -4
- data/lib/chef/resource/freebsd_package.rb +2 -10
- data/lib/chef/resource/lwrp_base.rb +1 -12
- data/lib/chef/resource/user.rb +0 -18
- data/lib/chef/resource_collection.rb +1 -1
- data/lib/chef/resource_reporter.rb +10 -10
- data/lib/chef/resources.rb +0 -1
- data/lib/chef/role.rb +3 -3
- data/lib/chef/run_list.rb +1 -1
- data/lib/chef/tasks/chef_repo.rake +131 -264
- data/lib/chef/user.rb +1 -1
- data/lib/chef/util/path_helper.rb +2 -2
- data/lib/chef/version.rb +9 -1
- data/lib/chef/win32/api/system.rb +0 -9
- data/spec/data/bootstrap/test-hints.erb +1 -1
- data/spec/data/bootstrap/test.erb +1 -1
- data/spec/functional/dsl/reboot_pending_spec.rb +53 -58
- data/spec/functional/knife/cookbook_delete_spec.rb +3 -3
- data/spec/functional/knife/exec_spec.rb +1 -1
- data/spec/functional/mixin/shell_out_spec.rb +48 -0
- data/spec/functional/resource/base.rb +0 -10
- data/spec/functional/resource/group_spec.rb +1 -5
- data/spec/functional/resource/link_spec.rb +8 -0
- data/spec/functional/resource/{user/useradd_spec.rb → user_spec.rb} +1 -1
- data/spec/integration/knife/chef_fs_data_store_spec.rb +3 -3
- data/spec/integration/knife/chef_repo_path_spec.rb +1 -6
- data/spec/integration/knife/chef_repository_file_system_spec.rb +1 -1
- data/spec/integration/knife/chefignore_spec.rb +1 -1
- data/spec/integration/knife/common_options_spec.rb +50 -3
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +1 -1
- data/spec/integration/knife/delete_spec.rb +1 -1
- data/spec/integration/knife/deps_spec.rb +1 -1
- data/spec/integration/knife/diff_spec.rb +3 -3
- data/spec/integration/knife/download_spec.rb +3 -3
- data/spec/integration/knife/list_spec.rb +1 -1
- data/spec/integration/knife/raw_spec.rb +1 -11
- data/spec/integration/knife/redirection_spec.rb +1 -1
- data/spec/integration/knife/serve_spec.rb +2 -2
- data/spec/integration/knife/show_spec.rb +1 -1
- data/spec/integration/knife/upload_spec.rb +9 -9
- data/spec/spec_helper.rb +0 -9
- data/spec/support/pedant/pedant_config.rb +2 -1
- data/spec/support/pedant/run_pedant.rb +2 -1
- data/spec/support/platform_helpers.rb +5 -24
- data/spec/support/shared/integration/integration_helper.rb +2 -1
- data/spec/support/shared/matchers.rb +17 -0
- data/spec/tiny_server.rb +1 -2
- data/spec/unit/api_client_spec.rb +3 -3
- data/spec/unit/application_spec.rb +9 -32
- data/spec/unit/config_fetcher_spec.rb +1 -1
- data/spec/unit/cookbook/metadata_spec.rb +3 -7
- data/spec/unit/cookbook/synchronizer_spec.rb +441 -226
- data/spec/unit/cookbook_loader_spec.rb +1 -1
- data/spec/unit/cookbook_uploader_spec.rb +160 -0
- data/spec/unit/cookbook_version_spec.rb +0 -4
- data/spec/unit/data_bag_item_spec.rb +1 -5
- data/spec/unit/data_bag_spec.rb +1 -5
- data/spec/unit/deprecation_spec.rb +1 -1
- data/spec/unit/dsl/recipe_spec.rb +12 -0
- data/spec/unit/encrypted_data_bag_item_spec.rb +7 -14
- data/spec/unit/environment_spec.rb +3 -7
- data/spec/unit/exceptions_spec.rb +0 -6
- data/spec/unit/http/json_input_spec.rb +128 -0
- data/spec/unit/json_compat_spec.rb +17 -58
- data/spec/unit/knife/client_create_spec.rb +3 -3
- data/spec/unit/knife/configure_client_spec.rb +6 -5
- data/spec/unit/knife/cookbook_delete_spec.rb +1 -1
- data/spec/unit/knife/cookbook_download_spec.rb +5 -5
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +1 -0
- data/spec/unit/knife/cookbook_metadata_spec.rb +1 -1
- data/spec/unit/knife/cookbook_site_download_spec.rb +10 -11
- data/spec/unit/knife/cookbook_site_install_spec.rb +116 -161
- data/spec/unit/knife/cookbook_site_share_spec.rb +8 -8
- data/spec/unit/knife/cookbook_upload_spec.rb +3 -2
- data/spec/unit/knife/core/bootstrap_context_spec.rb +3 -3
- data/spec/unit/knife/core/subcommand_loader_spec.rb +1 -66
- data/spec/unit/knife/data_bag_from_file_spec.rb +2 -1
- data/spec/unit/knife/tag_create_spec.rb +3 -3
- data/spec/unit/knife/tag_delete_spec.rb +3 -3
- data/spec/unit/knife/user_create_spec.rb +1 -1
- data/spec/unit/knife_spec.rb +14 -14
- data/spec/unit/lwrp_spec.rb +1 -21
- data/spec/unit/mixin/shell_out_spec.rb +92 -0
- data/spec/unit/node_spec.rb +0 -4
- data/spec/unit/platform/query_helpers_spec.rb +0 -23
- data/spec/unit/provider/env/windows_spec.rb +34 -70
- data/spec/unit/provider/env_spec.rb +11 -76
- data/spec/unit/provider/group/dscl_spec.rb +1 -38
- data/spec/unit/provider/log_spec.rb +18 -0
- data/spec/unit/provider/package/rpm_spec.rb +0 -12
- data/spec/unit/provider/remote_file/cache_control_data_spec.rb +1 -1
- data/spec/unit/provider/service/systemd_service_spec.rb +44 -27
- data/spec/unit/provider/user/dscl_spec.rb +264 -660
- data/spec/unit/provider/user/useradd_spec.rb +0 -1
- data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +2 -2
- data/spec/unit/provider_spec.rb +12 -0
- data/spec/unit/recipe_spec.rb +0 -41
- data/spec/unit/resource_collection_spec.rb +1 -5
- data/spec/unit/resource_reporter_spec.rb +3 -51
- data/spec/unit/resource_spec.rb +3 -14
- data/spec/unit/rest_spec.rb +1 -4
- data/spec/unit/role_spec.rb +0 -10
- data/spec/unit/run_list_spec.rb +1 -5
- data/spec/unit/user_spec.rb +1 -5
- metadata +20 -100
- data/lib/chef/mixin/windows_env_helper.rb +0 -56
- data/lib/chef/provider/dsc_script.rb +0 -175
- data/lib/chef/resource/dsc_script.rb +0 -126
- data/lib/chef/streaming_cookbook_uploader.rb +0 -205
- data/lib/chef/util/dsc/configuration_generator.rb +0 -115
- data/lib/chef/util/dsc/lcm_output_parser.rb +0 -133
- data/lib/chef/util/dsc/local_configuration_manager.rb +0 -141
- data/lib/chef/util/dsc/resource_info.rb +0 -26
- data/lib/chef/util/powershell/cmdlet.rb +0 -136
- data/lib/chef/util/powershell/cmdlet_result.rb +0 -46
- data/spec/data/mac_users/10.7-8.plist.xml +0 -559
- data/spec/data/mac_users/10.7-8.shadow.xml +0 -11
- data/spec/data/mac_users/10.7.plist.xml +0 -559
- data/spec/data/mac_users/10.7.shadow.xml +0 -11
- data/spec/data/mac_users/10.8.plist.xml +0 -559
- data/spec/data/mac_users/10.8.shadow.xml +0 -21
- data/spec/data/mac_users/10.9.plist.xml +0 -560
- data/spec/data/mac_users/10.9.shadow.xml +0 -21
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +0 -51
- data/spec/functional/resource/dsc_script_spec.rb +0 -382
- data/spec/functional/resource/env_spec.rb +0 -182
- data/spec/functional/resource/user/dscl_spec.rb +0 -199
- data/spec/functional/util/powershell/cmdlet_spec.rb +0 -113
- data/spec/support/lib/chef/resource/zen_follower.rb +0 -46
- data/spec/support/shared/shared_examples.rb +0 -10
- data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +0 -63
- data/spec/unit/formatters/base_spec.rb +0 -48
- data/spec/unit/provider/dsc_script_spec.rb +0 -174
- data/spec/unit/resource/dsc_script_spec.rb +0 -98
- data/spec/unit/util/dsc/configuration_generator_spec.rb +0 -171
- data/spec/unit/util/dsc/lcm_output_parser_spec.rb +0 -169
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +0 -139
- data/spec/unit/util/powershell/cmdlet_spec.rb +0 -106
@@ -17,15 +17,12 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'chef/provider/group/groupadd'
|
20
|
-
require 'chef/mixin/shell_out'
|
21
20
|
|
22
21
|
class Chef
|
23
22
|
class Provider
|
24
23
|
class Group
|
25
24
|
class Usermod < Chef::Provider::Group::Groupadd
|
26
25
|
|
27
|
-
include Chef::Mixin::ShellOut
|
28
|
-
|
29
26
|
def load_current_resource
|
30
27
|
super
|
31
28
|
end
|
data/lib/chef/provider/link.rb
CHANGED
@@ -18,7 +18,6 @@
|
|
18
18
|
|
19
19
|
require 'chef/config'
|
20
20
|
require 'chef/log'
|
21
|
-
require 'chef/mixin/shell_out'
|
22
21
|
require 'chef/mixin/file_class'
|
23
22
|
require 'chef/resource/link'
|
24
23
|
require 'chef/provider'
|
@@ -29,7 +28,6 @@ class Chef
|
|
29
28
|
class Link < Chef::Provider
|
30
29
|
|
31
30
|
include Chef::Mixin::EnforceOwnershipAndPermissions
|
32
|
-
include Chef::Mixin::ShellOut
|
33
31
|
include Chef::Mixin::FileClass
|
34
32
|
|
35
33
|
def negative_complement(big)
|
@@ -89,11 +87,30 @@ class Chef
|
|
89
87
|
end
|
90
88
|
|
91
89
|
def action_create
|
90
|
+
# current_resource is the symlink that currently exists
|
91
|
+
# new_resource is the symlink we need to create
|
92
|
+
# to - the location to link to
|
93
|
+
# target_file - the name of the link
|
94
|
+
|
92
95
|
if @current_resource.to != canonicalize(@new_resource.to) ||
|
93
96
|
@current_resource.link_type != @new_resource.link_type
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
+
# Handle the case where the symlink already exists and is pointing at a valid to_file
|
98
|
+
if @current_resource.to
|
99
|
+
# On Windows, to fix a symlink already pointing at a directory we must first
|
100
|
+
# ::Dir.unlink the symlink (not the directory), while if we have a symlink
|
101
|
+
# pointing at file we must use ::File.unlink on the symlink.
|
102
|
+
# However if the new symlink will point to a file and the current symlink is pointing at a
|
103
|
+
# directory we want to throw an exception and calling ::File.unlink on the directory symlink
|
104
|
+
# will throw the correct ones.
|
105
|
+
if Chef::Platform.windows? && ::File.directory?(@new_resource.to) &&
|
106
|
+
::File.directory?(@current_resource.target_file)
|
107
|
+
converge_by("unlink existing windows symlink to dir at #{@new_resource.target_file}") do
|
108
|
+
::Dir.unlink(@new_resource.target_file)
|
109
|
+
end
|
110
|
+
else
|
111
|
+
converge_by("unlink existing symlink to file at #{@new_resource.target_file}") do
|
112
|
+
::File.unlink(@new_resource.target_file)
|
113
|
+
end
|
97
114
|
end
|
98
115
|
end
|
99
116
|
if @new_resource.link_type == :symbolic
|
data/lib/chef/provider/log.rb
CHANGED
@@ -25,6 +25,9 @@ class Chef
|
|
25
25
|
# Chef log provider, allows logging to chef's logs from recipes
|
26
26
|
class ChefLog < Chef::Provider
|
27
27
|
|
28
|
+
# ordered array of the log levels
|
29
|
+
@@levels = [ :debug, :info, :warn, :error, :fatal ]
|
30
|
+
|
28
31
|
# No concept of a 'current' resource for logs, this is a no-op
|
29
32
|
#
|
30
33
|
# === Return
|
@@ -39,7 +42,18 @@ class Chef
|
|
39
42
|
# true:: Always return true
|
40
43
|
def action_write
|
41
44
|
Chef::Log.send(@new_resource.level, @new_resource.message)
|
42
|
-
|
45
|
+
|
46
|
+
# resolve the integers for the current log levels
|
47
|
+
global_level = Mixlib::Log::LEVELS.fetch(Chef::Log.level)
|
48
|
+
resource_level = Mixlib::Log::LEVELS.fetch(@new_resource.level)
|
49
|
+
|
50
|
+
# If the resource level is greater than or the same os the global
|
51
|
+
# level, then it should have been written to the log. Mark the
|
52
|
+
# resource as updated.
|
53
|
+
if resource_level >= global_level
|
54
|
+
@new_resource.updated_by_last_action(true)
|
55
|
+
end
|
56
|
+
|
43
57
|
end
|
44
58
|
|
45
59
|
end
|
@@ -49,6 +63,3 @@ class Chef
|
|
49
63
|
end
|
50
64
|
|
51
65
|
end
|
52
|
-
|
53
|
-
|
54
|
-
|
data/lib/chef/provider/mdadm.rb
CHANGED
@@ -17,15 +17,12 @@
|
|
17
17
|
#
|
18
18
|
|
19
19
|
require 'chef/log'
|
20
|
-
require 'chef/mixin/shell_out'
|
21
20
|
require 'chef/provider'
|
22
21
|
|
23
22
|
class Chef
|
24
23
|
class Provider
|
25
24
|
class Mdadm < Chef::Provider
|
26
25
|
|
27
|
-
include Chef::Mixin::ShellOut
|
28
|
-
|
29
26
|
def popen4
|
30
27
|
raise Exception, "deprecated"
|
31
28
|
end
|
@@ -18,13 +18,11 @@
|
|
18
18
|
|
19
19
|
require 'chef/provider/mount'
|
20
20
|
require 'chef/log'
|
21
|
-
require 'chef/mixin/shell_out'
|
22
21
|
|
23
22
|
class Chef
|
24
23
|
class Provider
|
25
24
|
class Mount
|
26
25
|
class Mount < Chef::Provider::Mount
|
27
|
-
include Chef::Mixin::ShellOut
|
28
26
|
|
29
27
|
def initialize(new_resource, run_context)
|
30
28
|
super
|
@@ -20,14 +20,12 @@
|
|
20
20
|
|
21
21
|
require 'chef/provider/mount'
|
22
22
|
require 'chef/log'
|
23
|
-
require 'chef/mixin/shell_out'
|
24
23
|
require 'forwardable'
|
25
24
|
|
26
25
|
class Chef
|
27
26
|
class Provider
|
28
27
|
class Mount
|
29
28
|
class Solaris < Chef::Provider::Mount
|
30
|
-
include Chef::Mixin::ShellOut
|
31
29
|
extend Forwardable
|
32
30
|
|
33
31
|
VFSTAB = "/etc/vfstab".freeze
|
@@ -198,7 +198,6 @@ class Chef
|
|
198
198
|
|
199
199
|
Chef::Log.debug("#{@new_resource} fetching preseed file to #{cache_seed_to}")
|
200
200
|
|
201
|
-
|
202
201
|
if template_available?(@new_resource.response_file)
|
203
202
|
Chef::Log.debug("#{@new_resource} fetching preseed file via Template")
|
204
203
|
remote_file = Chef::Resource::Template.new(cache_seed_to, run_context)
|
@@ -19,15 +19,12 @@
|
|
19
19
|
require 'chef/provider/package'
|
20
20
|
require 'chef/mixin/command'
|
21
21
|
require 'chef/resource/package'
|
22
|
-
require 'chef/mixin/shell_out'
|
23
|
-
|
24
22
|
|
25
23
|
class Chef
|
26
24
|
class Provider
|
27
25
|
class Package
|
28
26
|
class Apt < Chef::Provider::Package
|
29
27
|
|
30
|
-
include Chef::Mixin::ShellOut
|
31
28
|
attr_accessor :is_virtual_package
|
32
29
|
|
33
30
|
def load_current_resource
|
@@ -18,17 +18,13 @@
|
|
18
18
|
|
19
19
|
require 'chef/provider/package'
|
20
20
|
require 'chef/mixin/command'
|
21
|
-
require 'chef/mixin/shell_out'
|
22
21
|
require 'chef/resource/package'
|
23
|
-
require 'chef/mixin/shell_out'
|
24
22
|
|
25
23
|
class Chef
|
26
24
|
class Provider
|
27
25
|
class Package
|
28
26
|
class EasyInstall < Chef::Provider::Package
|
29
27
|
|
30
|
-
include Chef::Mixin::ShellOut
|
31
|
-
|
32
28
|
def install_check(name)
|
33
29
|
check = false
|
34
30
|
|
@@ -21,7 +21,6 @@
|
|
21
21
|
|
22
22
|
require 'chef/resource/package'
|
23
23
|
require 'chef/provider/package'
|
24
|
-
require 'chef/mixin/shell_out'
|
25
24
|
require 'chef/mixin/get_source_from_package'
|
26
25
|
|
27
26
|
class Chef
|
@@ -63,9 +62,7 @@ class Chef
|
|
63
62
|
end
|
64
63
|
end
|
65
64
|
|
66
|
-
|
67
65
|
class Base < Chef::Provider::Package
|
68
|
-
include Chef::Mixin::ShellOut
|
69
66
|
include Chef::Mixin::GetSourceFromPackage
|
70
67
|
|
71
68
|
def initialize(*args)
|
@@ -21,14 +21,12 @@ require 'open3'
|
|
21
21
|
require 'chef/provider/package'
|
22
22
|
require 'chef/mixin/command'
|
23
23
|
require 'chef/resource/package'
|
24
|
-
require 'chef/mixin/shell_out'
|
25
24
|
|
26
25
|
class Chef
|
27
26
|
class Provider
|
28
27
|
class Package
|
29
28
|
class Ips < Chef::Provider::Package
|
30
29
|
|
31
|
-
include Chef::Mixin::ShellOut
|
32
30
|
attr_accessor :virtual
|
33
31
|
|
34
32
|
def define_resource_requirements
|
@@ -98,4 +96,3 @@ class Chef
|
|
98
96
|
end
|
99
97
|
end
|
100
98
|
end
|
101
|
-
|
@@ -18,15 +18,12 @@
|
|
18
18
|
|
19
19
|
require 'chef/provider/package'
|
20
20
|
require 'chef/resource/package'
|
21
|
-
require 'chef/mixin/shell_out'
|
22
21
|
|
23
22
|
class Chef
|
24
23
|
class Provider
|
25
24
|
class Package
|
26
25
|
class Paludis < Chef::Provider::Package
|
27
26
|
|
28
|
-
include Chef::Mixin::ShellOut
|
29
|
-
|
30
27
|
def load_current_resource
|
31
28
|
@current_resource = Chef::Resource::Package.new(@new_resource.package_name)
|
32
29
|
@current_resource.package_name(@new_resource.package_name)
|
@@ -87,5 +84,3 @@ class Chef
|
|
87
84
|
end
|
88
85
|
end
|
89
86
|
end
|
90
|
-
|
91
|
-
|
@@ -55,7 +55,6 @@ class Chef
|
|
55
55
|
@current_resource
|
56
56
|
end
|
57
57
|
|
58
|
-
|
59
58
|
def parse_emerge(package, txt)
|
60
59
|
availables = {}
|
61
60
|
found_package_name = nil
|
@@ -103,7 +102,6 @@ class Chef
|
|
103
102
|
|
104
103
|
end
|
105
104
|
|
106
|
-
|
107
105
|
def install_package(name, version)
|
108
106
|
pkg = "=#{name}-#{version}"
|
109
107
|
|
@@ -60,7 +60,7 @@ class Chef
|
|
60
60
|
status = popen4("rpm -qp --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@new_resource.source}") do |pid, stdin, stdout, stderr|
|
61
61
|
stdout.each do |line|
|
62
62
|
case line
|
63
|
-
when
|
63
|
+
when /([\w\d+_.-]+)\s([\w\d_.-]+)/
|
64
64
|
@current_resource.package_name($1)
|
65
65
|
@new_resource.version($2)
|
66
66
|
@candidate_version = $2
|
@@ -78,14 +78,13 @@ class Chef
|
|
78
78
|
@rpm_status = popen4("rpm -q --queryformat '%{NAME} %{VERSION}-%{RELEASE}\n' #{@current_resource.package_name}") do |pid, stdin, stdout, stderr|
|
79
79
|
stdout.each do |line|
|
80
80
|
case line
|
81
|
-
when
|
81
|
+
when /([\w\d+_.-]+)\s([\w\d_.-]+)/
|
82
82
|
Chef::Log.debug("#{@new_resource} current version is #{$2}")
|
83
83
|
@current_resource.version($2)
|
84
84
|
end
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
-
|
89
88
|
@current_resource
|
90
89
|
end
|
91
90
|
|
@@ -119,4 +118,3 @@ class Chef
|
|
119
118
|
end
|
120
119
|
end
|
121
120
|
end
|
122
|
-
|
@@ -273,8 +273,6 @@ class Chef
|
|
273
273
|
@platform_cache ||= {}
|
274
274
|
end
|
275
275
|
|
276
|
-
include Chef::Mixin::ShellOut
|
277
|
-
|
278
276
|
attr_reader :gem_binary_location
|
279
277
|
|
280
278
|
def initialize(gem_binary_location)
|
@@ -352,8 +350,6 @@ class Chef
|
|
352
350
|
|
353
351
|
end
|
354
352
|
|
355
|
-
include Chef::Mixin::ShellOut
|
356
|
-
|
357
353
|
attr_reader :gem_env
|
358
354
|
attr_reader :cleanup_gem_env
|
359
355
|
|
@@ -20,7 +20,6 @@
|
|
20
20
|
#
|
21
21
|
|
22
22
|
require 'chef/provider/package'
|
23
|
-
require 'chef/mixin/shell_out'
|
24
23
|
require 'chef/resource/package'
|
25
24
|
require 'chef/mixin/get_source_from_package'
|
26
25
|
|
@@ -28,10 +27,8 @@ class Chef
|
|
28
27
|
class Provider
|
29
28
|
class Package
|
30
29
|
class SmartOS < Chef::Provider::Package
|
31
|
-
include Chef::Mixin::ShellOut
|
32
30
|
attr_accessor :is_virtual_package
|
33
31
|
|
34
|
-
|
35
32
|
def load_current_resource
|
36
33
|
Chef::Log.debug("#{@new_resource} loading current resource")
|
37
34
|
@current_resource = Chef::Resource::Package.new(@new_resource.name)
|
@@ -18,7 +18,6 @@
|
|
18
18
|
|
19
19
|
# TODO: Allow @new_resource.source to be a Product Code as a GUID for uninstall / network install
|
20
20
|
|
21
|
-
require 'chef/mixin/shell_out'
|
22
21
|
require 'chef/win32/api/installer' if RUBY_PLATFORM =~ /mswin|mingw32|windows/
|
23
22
|
|
24
23
|
class Chef
|
@@ -27,7 +26,6 @@ class Chef
|
|
27
26
|
class Windows
|
28
27
|
class MSI
|
29
28
|
include Chef::ReservedNames::Win32::API::Installer if RUBY_PLATFORM =~ /mswin|mingw32|windows/
|
30
|
-
include Chef::Mixin::ShellOut
|
31
29
|
|
32
30
|
def initialize(resource)
|
33
31
|
@new_resource = resource
|
@@ -19,12 +19,10 @@
|
|
19
19
|
require 'chef/config'
|
20
20
|
require 'chef/provider/package'
|
21
21
|
require 'chef/mixin/command'
|
22
|
-
require 'chef/mixin/shell_out'
|
23
22
|
require 'chef/resource/package'
|
24
23
|
require 'singleton'
|
25
24
|
require 'chef/mixin/get_source_from_package'
|
26
25
|
|
27
|
-
|
28
26
|
class Chef
|
29
27
|
class Provider
|
30
28
|
class Package
|
@@ -647,7 +645,6 @@ class Chef
|
|
647
645
|
# Cache for our installed and available packages, pulled in from yum-dump.py
|
648
646
|
class YumCache
|
649
647
|
include Chef::Mixin::Command
|
650
|
-
include Chef::Mixin::ShellOut
|
651
648
|
include Singleton
|
652
649
|
|
653
650
|
def initialize
|
@@ -949,7 +946,6 @@ class Chef
|
|
949
946
|
end # YumCache
|
950
947
|
|
951
948
|
include Chef::Mixin::GetSourceFromPackage
|
952
|
-
include Chef::Mixin::ShellOut
|
953
949
|
|
954
950
|
def initialize(new_resource, run_context)
|
955
951
|
super
|
@@ -22,7 +22,6 @@
|
|
22
22
|
require 'chef/provider/package'
|
23
23
|
require 'chef/mixin/command'
|
24
24
|
require 'chef/resource/package'
|
25
|
-
require 'chef/mixin/shell_out'
|
26
25
|
require 'singleton'
|
27
26
|
|
28
27
|
class Chef
|
@@ -30,8 +29,6 @@ class Chef
|
|
30
29
|
class Package
|
31
30
|
class Zypper < Chef::Provider::Package
|
32
31
|
|
33
|
-
include Chef::Mixin::ShellOut
|
34
|
-
|
35
32
|
def load_current_resource
|
36
33
|
@current_resource = Chef::Resource::Package.new(@new_resource.name)
|
37
34
|
@current_resource.package_name(@new_resource.package_name)
|
@@ -25,7 +25,6 @@ require 'chef/provider'
|
|
25
25
|
require 'etc'
|
26
26
|
require 'fileutils'
|
27
27
|
require 'chef/scan_access_control'
|
28
|
-
require 'chef/mixin/shell_out'
|
29
28
|
require 'chef/win32/registry'
|
30
29
|
|
31
30
|
class Chef
|
@@ -33,7 +32,6 @@ class Chef
|
|
33
32
|
class Provider
|
34
33
|
class RegistryKey < Chef::Provider
|
35
34
|
include Chef::Mixin::Checksum
|
36
|
-
include Chef::Mixin::ShellOut
|
37
35
|
|
38
36
|
def whyrun_supported?
|
39
37
|
true
|