chef 11.12.8-x86-mingw32 → 11.14.0.alpha.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +4 -2
  3. data/distro/common/html/_sources/index.txt +6 -0
  4. data/distro/common/html/_sources/knife_ssl_check.txt +41 -0
  5. data/distro/common/html/_sources/knife_ssl_fetch.txt +41 -0
  6. data/distro/common/html/_static/basic.css +2 -5
  7. data/distro/common/html/_static/doctools.js +5 -14
  8. data/distro/common/html/_static/jquery.js +2 -154
  9. data/distro/common/html/_static/pygments.css +2 -2
  10. data/distro/common/html/_static/searchtools.js +212 -150
  11. data/distro/common/html/_static/underscore.js +29 -21
  12. data/distro/common/html/_static/websupport.js +1 -1
  13. data/distro/common/html/ctl_chef_client.html +15 -18
  14. data/distro/common/html/ctl_chef_server.html +7 -7
  15. data/distro/common/html/ctl_chef_shell.html +6 -6
  16. data/distro/common/html/ctl_chef_solo.html +7 -8
  17. data/distro/common/html/index.html +34 -24
  18. data/distro/common/html/knife.html +23 -24
  19. data/distro/common/html/knife_bootstrap.html +13 -9
  20. data/distro/common/html/knife_client.html +10 -11
  21. data/distro/common/html/knife_common_options.html +6 -7
  22. data/distro/common/html/knife_configure.html +3 -4
  23. data/distro/common/html/knife_cookbook.html +18 -11
  24. data/distro/common/html/knife_cookbook_site.html +14 -14
  25. data/distro/common/html/knife_data_bag.html +24 -23
  26. data/distro/common/html/knife_delete.html +4 -5
  27. data/distro/common/html/knife_deps.html +4 -5
  28. data/distro/common/html/knife_diff.html +6 -7
  29. data/distro/common/html/knife_download.html +12 -13
  30. data/distro/common/html/knife_edit.html +4 -5
  31. data/distro/common/html/knife_environment.html +8 -9
  32. data/distro/common/html/knife_exec.html +9 -10
  33. data/distro/common/html/knife_index_rebuild.html +4 -5
  34. data/distro/common/html/knife_list.html +8 -9
  35. data/distro/common/html/knife_node.html +34 -33
  36. data/distro/common/html/knife_raw.html +2 -3
  37. data/distro/common/html/knife_recipe_list.html +3 -4
  38. data/distro/common/html/knife_role.html +30 -29
  39. data/distro/common/html/knife_search.html +7 -7
  40. data/distro/common/html/knife_show.html +4 -5
  41. data/distro/common/html/knife_ssh.html +2 -3
  42. data/distro/common/html/knife_ssl_check.html +148 -0
  43. data/distro/common/html/knife_ssl_fetch.html +152 -0
  44. data/distro/common/html/knife_status.html +4 -5
  45. data/distro/common/html/knife_tag.html +2 -3
  46. data/distro/common/html/knife_upload.html +5 -6
  47. data/distro/common/html/knife_user.html +9 -10
  48. data/distro/common/html/knife_using.html +12 -12
  49. data/distro/common/html/knife_xargs.html +11 -12
  50. data/distro/common/html/search.html +1 -2
  51. data/distro/common/html/searchindex.js +1 -1
  52. data/distro/common/man/man1/chef-shell.1 +19 -11
  53. data/distro/common/man/man1/knife-bootstrap.1 +35 -19
  54. data/distro/common/man/man1/knife-client.1 +111 -28
  55. data/distro/common/man/man1/knife-configure.1 +30 -14
  56. data/distro/common/man/man1/knife-cookbook-site.1 +105 -22
  57. data/distro/common/man/man1/knife-cookbook.1 +164 -23
  58. data/distro/common/man/man1/knife-data-bag.1 +157 -33
  59. data/distro/common/man/man1/knife-delete.1 +21 -17
  60. data/distro/common/man/man1/knife-deps.1 +60 -16
  61. data/distro/common/man/man1/knife-diff.1 +37 -17
  62. data/distro/common/man/man1/knife-download.1 +68 -24
  63. data/distro/common/man/man1/knife-edit.1 +19 -15
  64. data/distro/common/man/man1/knife-environment.1 +105 -17
  65. data/distro/common/man/man1/knife-exec.1 +78 -18
  66. data/distro/common/man/man1/knife-index-rebuild.1 +16 -8
  67. data/distro/common/man/man1/knife-list.1 +39 -23
  68. data/distro/common/man/man1/knife-node.1 +170 -22
  69. data/distro/common/man/man1/knife-raw.1 +33 -13
  70. data/distro/common/man/man1/knife-recipe-list.1 +17 -5
  71. data/distro/common/man/man1/knife-role.1 +86 -18
  72. data/distro/common/man/man1/knife-search.1 +80 -16
  73. data/distro/common/man/man1/knife-show.1 +30 -14
  74. data/distro/common/man/man1/knife-ssh.1 +54 -14
  75. data/distro/common/man/man1/knife-ssl-check.1 +207 -0
  76. data/distro/common/man/man1/knife-ssl-fetch.1 +207 -0
  77. data/distro/common/man/man1/knife-status.1 +48 -12
  78. data/distro/common/man/man1/knife-tag.1 +30 -10
  79. data/distro/common/man/man1/knife-upload.1 +72 -20
  80. data/distro/common/man/man1/knife-user.1 +79 -23
  81. data/distro/common/man/man1/knife-xargs.1 +61 -53
  82. data/distro/common/man/man8/chef-client.8 +87 -29
  83. data/distro/common/man/man8/chef-solo.8 +36 -15
  84. data/lib/chef/application.rb +19 -14
  85. data/lib/chef/application/client.rb +5 -0
  86. data/lib/chef/application/solo.rb +5 -0
  87. data/lib/chef/application/windows_service_manager.rb +3 -0
  88. data/lib/chef/chef_fs/chef_fs_data_store.rb +72 -24
  89. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +20 -4
  90. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +20 -1
  91. data/lib/chef/chef_fs/file_system/file_system_entry.rb +10 -2
  92. data/lib/chef/client.rb +2 -3
  93. data/lib/chef/config.rb +34 -8
  94. data/lib/chef/cookbook/cookbook_version_loader.rb +45 -4
  95. data/lib/chef/cookbook_version.rb +38 -30
  96. data/lib/chef/dsl/recipe.rb +4 -1
  97. data/lib/chef/event_dispatch/base.rb +14 -0
  98. data/lib/chef/event_dispatch/events_output_stream.rb +29 -0
  99. data/lib/chef/exceptions.rb +8 -0
  100. data/lib/chef/formatters/base.rb +16 -45
  101. data/lib/chef/formatters/doc.rb +51 -26
  102. data/lib/chef/formatters/indentable_output_stream.rb +165 -0
  103. data/lib/chef/knife/node_environment_set.rb +54 -0
  104. data/lib/chef/knife/user_create.rb +1 -1
  105. data/lib/chef/monkey_patches/pathname.rb +32 -0
  106. data/lib/chef/node.rb +1 -1
  107. data/lib/chef/platform/provider_mapping.rb +345 -338
  108. data/lib/chef/policy_builder/expand_node_object.rb +1 -1
  109. data/lib/chef/policy_builder/policyfile.rb +1 -1
  110. data/lib/chef/provider.rb +1 -0
  111. data/lib/chef/provider/git.rb +1 -1
  112. data/lib/chef/provider/link.rb +2 -2
  113. data/lib/chef/provider/remote_file/content.rb +1 -1
  114. data/lib/chef/provider/remote_file/local_file.rb +8 -2
  115. data/lib/chef/provider/service/arch.rb +0 -1
  116. data/lib/chef/provider/service/debian.rb +0 -2
  117. data/lib/chef/provider/service/freebsd.rb +2 -1
  118. data/lib/chef/provider/service/gentoo.rb +1 -1
  119. data/lib/chef/provider/service/init.rb +0 -1
  120. data/lib/chef/provider/service/insserv.rb +0 -2
  121. data/lib/chef/provider/service/invokercd.rb +0 -2
  122. data/lib/chef/provider/service/macosx.rb +2 -1
  123. data/lib/chef/provider/service/redhat.rb +0 -1
  124. data/lib/chef/provider/service/simple.rb +1 -0
  125. data/lib/chef/provider/service/solaris.rb +1 -0
  126. data/lib/chef/provider/service/systemd.rb +1 -1
  127. data/lib/chef/provider/service/upstart.rb +1 -1
  128. data/lib/chef/provider/user.rb +9 -9
  129. data/lib/chef/provider/user/solaris.rb +2 -0
  130. data/lib/chef/resource.rb +1 -0
  131. data/lib/chef/resource/remote_file.rb +32 -6
  132. data/lib/chef/run_context.rb +22 -0
  133. data/lib/chef/run_lock.rb +43 -4
  134. data/lib/chef/version.rb +2 -2
  135. data/spec/functional/http/simple_spec.rb +84 -0
  136. data/spec/functional/resource/remote_file_spec.rb +107 -43
  137. data/spec/functional/rest_spec.rb +94 -0
  138. data/spec/functional/run_lock_spec.rb +1 -1
  139. data/spec/functional/win32/service_manager_spec.rb +6 -0
  140. data/spec/integration/knife/chef_fs_data_store_spec.rb +2 -0
  141. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +76 -0
  142. data/spec/spec_helper.rb +2 -0
  143. data/spec/support/mock/platform.rb +7 -0
  144. data/spec/support/pedant/pedant_config.rb +121 -0
  145. data/spec/support/pedant/run_pedant.rb +63 -0
  146. data/spec/support/pedant/stickywicket.pem +27 -0
  147. data/spec/support/shared/functional/http.rb +242 -0
  148. data/spec/support/shared/unit/api_error_inspector.rb +2 -2
  149. data/spec/unit/api_client_spec.rb +2 -2
  150. data/spec/unit/application/client_spec.rb +6 -1
  151. data/spec/unit/application/knife_spec.rb +4 -0
  152. data/spec/unit/application/solo_spec.rb +2 -0
  153. data/spec/unit/application_spec.rb +7 -0
  154. data/spec/unit/client_spec.rb +16 -0
  155. data/spec/unit/config_spec.rb +3 -20
  156. data/spec/unit/cookbook_version_spec.rb +224 -122
  157. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +2 -2
  158. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +2 -2
  159. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +2 -2
  160. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +2 -2
  161. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +2 -2
  162. data/spec/unit/handler_spec.rb +0 -1
  163. data/spec/unit/knife/client_bulk_delete_spec.rb +3 -0
  164. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +2 -0
  165. data/spec/unit/knife/cookbook_metadata_spec.rb +2 -2
  166. data/spec/unit/knife/cookbook_site_install_spec.rb +3 -1
  167. data/spec/unit/knife/cookbook_upload_spec.rb +10 -10
  168. data/spec/unit/knife/node_environment_set_spec.rb +80 -0
  169. data/spec/unit/knife/user_create_spec.rb +6 -4
  170. data/spec/unit/knife/user_edit_spec.rb +5 -0
  171. data/spec/unit/knife_spec.rb +3 -0
  172. data/spec/unit/mixin/securable_spec.rb +18 -20
  173. data/spec/unit/node/attribute_spec.rb +15 -2
  174. data/spec/unit/node/immutable_collections_spec.rb +4 -4
  175. data/spec/unit/provider/cron_spec.rb +14 -14
  176. data/spec/unit/provider/git_spec.rb +4 -4
  177. data/spec/unit/provider/group_spec.rb +1 -1
  178. data/spec/unit/provider/ohai_spec.rb +2 -2
  179. data/spec/unit/provider/remote_file/content_spec.rb +58 -35
  180. data/spec/unit/provider/remote_file/local_file_spec.rb +23 -0
  181. data/spec/unit/provider/service/solaris_smf_service_spec.rb +13 -13
  182. data/spec/unit/resource/mount_spec.rb +0 -1
  183. data/spec/unit/resource/remote_file_spec.rb +29 -0
  184. data/spec/unit/resource_spec.rb +1 -1
  185. data/spec/unit/run_context_spec.rb +7 -0
  186. data/spec/unit/run_lock_spec.rb +98 -0
  187. data/spec/unit/version_constraint_spec.rb +1 -1
  188. metadata +166 -153
  189. data/distro/common/html/_static/chef.css +0 -507
  190. data/distro/common/html/_static/chef_logo.png +0 -0
  191. data/lib/chef/checksum/storage.rb +0 -18
  192. data/lib/chef/checksum/storage/filesystem.rb +0 -56
  193. data/spec/unit/checksum/storage/filesystem_spec.rb +0 -70
@@ -0,0 +1,54 @@
1
+ #
2
+ # Author:: Jimmy McCrory (<jimmy.mccrory@gmail.com>)
3
+ # Copyright:: Copyright (c) 2014 Jimmy McCrory
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'chef/knife'
20
+
21
+ class Chef
22
+ class Knife
23
+ class NodeEnvironmentSet < Knife
24
+
25
+ deps do
26
+ require 'chef/node'
27
+ end
28
+
29
+ banner "knife node environment set NODE ENVIRONMENT"
30
+
31
+ def run
32
+ if @name_args.size < 2
33
+ ui.fatal "You must specify a node name and an environment."
34
+ show_usage
35
+ exit 1
36
+ else
37
+ @node_name = @name_args[0]
38
+ @environment = @name_args[1]
39
+ end
40
+
41
+ node = Chef::Node.load(@node_name)
42
+
43
+ node.chef_environment = @environment
44
+
45
+ node.save
46
+
47
+ config[:attribute] = "chef_environment"
48
+
49
+ output(format_for_display(node))
50
+ end
51
+
52
+ end
53
+ end
54
+ end
@@ -84,7 +84,7 @@ class Chef
84
84
  f.print(user.private_key)
85
85
  end
86
86
  else
87
- puts user.private_key
87
+ ui.msg user.private_key
88
88
  end
89
89
  end
90
90
  end
@@ -0,0 +1,32 @@
1
+ require 'pathname'
2
+
3
+ if RUBY_VERSION.to_f < 1.9
4
+ class Pathname
5
+ @@old_each_filename = instance_method(:each_filename)
6
+
7
+ def each_filename(&block)
8
+ if block_given?
9
+ EachFilenameEnumerable.new(self).each(&block)
10
+ else
11
+ EachFilenameEnumerable.new(self)
12
+ end
13
+ end
14
+
15
+ def old_each_filename(&block)
16
+ @@old_each_filename.bind(self).call(&block)
17
+ end
18
+
19
+ class EachFilenameEnumerable
20
+ include Enumerable
21
+ attr_reader :pathname
22
+
23
+ def initialize(pathname)
24
+ @pathname = pathname
25
+ end
26
+
27
+ def each(&block)
28
+ @pathname.old_each_filename(&block)
29
+ end
30
+ end
31
+ end
32
+ end
data/lib/chef/node.rb CHANGED
@@ -498,7 +498,7 @@ class Chef
498
498
  def self.build(node_name)
499
499
  node = new
500
500
  node.name(node_name)
501
- node.chef_environment(Chef::Config[:environment]) unless Chef::Config[:environment].nil? || Chef::Config[:environment].chop.empty?
501
+ node.chef_environment(Chef::Config[:environment]) unless Chef::Config[:environment].nil? || Chef::Config[:environment].chomp.empty?
502
502
  node
503
503
  end
504
504
 
@@ -23,14 +23,8 @@ require 'chef/version_constraint/platform'
23
23
 
24
24
  # This file depends on nearly every provider in chef, but requiring them
25
25
  # directly causes circular requires resulting in uninitialized constant errors.
26
+ # Therefore, we do the includes inline rather than up top.
26
27
  require 'chef/provider'
27
- require 'chef/provider/log'
28
- require 'chef/provider/user'
29
- require 'chef/provider/group'
30
- require 'chef/provider/mount'
31
- require 'chef/provider/service'
32
- require 'chef/provider/package'
33
- require 'chef/provider/ifconfig'
34
28
 
35
29
 
36
30
  class Chef
@@ -40,343 +34,356 @@ class Chef
40
34
  attr_writer :platforms
41
35
 
42
36
  def platforms
43
- @platforms ||= {
44
- :mac_os_x => {
45
- :default => {
46
- :package => Chef::Provider::Package::Macports,
47
- :service => Chef::Provider::Service::Macosx,
48
- :user => Chef::Provider::User::Dscl,
49
- :group => Chef::Provider::Group::Dscl
50
- }
51
- },
52
- :mac_os_x_server => {
53
- :default => {
54
- :package => Chef::Provider::Package::Macports,
55
- :service => Chef::Provider::Service::Macosx,
56
- :user => Chef::Provider::User::Dscl,
57
- :group => Chef::Provider::Group::Dscl
58
- }
59
- },
60
- :freebsd => {
61
- :default => {
62
- :group => Chef::Provider::Group::Pw,
63
- :package => Chef::Provider::Package::Freebsd,
64
- :service => Chef::Provider::Service::Freebsd,
65
- :user => Chef::Provider::User::Pw,
66
- :cron => Chef::Provider::Cron
67
- }
68
- },
69
- :ubuntu => {
70
- :default => {
71
- :package => Chef::Provider::Package::Apt,
72
- :service => Chef::Provider::Service::Debian,
73
- :cron => Chef::Provider::Cron,
74
- :mdadm => Chef::Provider::Mdadm
37
+ @platforms ||= begin
38
+ require 'chef/providers'
39
+
40
+ {
41
+ :mac_os_x => {
42
+ :default => {
43
+ :package => Chef::Provider::Package::Macports,
44
+ :service => Chef::Provider::Service::Macosx,
45
+ :user => Chef::Provider::User::Dscl,
46
+ :group => Chef::Provider::Group::Dscl
47
+ }
75
48
  },
76
- ">= 11.10" => {
77
- :ifconfig => Chef::Provider::Ifconfig::Debian
78
- }
79
- },
80
- :gcel => {
81
- :default => {
82
- :package => Chef::Provider::Package::Apt,
83
- :service => Chef::Provider::Service::Debian,
84
- :cron => Chef::Provider::Cron,
85
- :mdadm => Chef::Provider::Mdadm
86
- }
87
- },
88
- :linaro => {
89
- :default => {
90
- :package => Chef::Provider::Package::Apt,
91
- :service => Chef::Provider::Service::Debian,
92
- :cron => Chef::Provider::Cron,
93
- :mdadm => Chef::Provider::Mdadm
94
- }
95
- },
96
- :raspbian => {
97
- :default => {
98
- :package => Chef::Provider::Package::Apt,
99
- :service => Chef::Provider::Service::Debian,
100
- :cron => Chef::Provider::Cron,
101
- :mdadm => Chef::Provider::Mdadm
102
- }
103
- },
104
- :linuxmint => {
105
- :default => {
106
- :package => Chef::Provider::Package::Apt,
107
- :service => Chef::Provider::Service::Upstart,
108
- :cron => Chef::Provider::Cron,
109
- :mdadm => Chef::Provider::Mdadm
110
- }
111
- },
112
- :debian => {
113
- :default => {
114
- :package => Chef::Provider::Package::Apt,
115
- :service => Chef::Provider::Service::Debian,
116
- :cron => Chef::Provider::Cron,
117
- :mdadm => Chef::Provider::Mdadm
49
+ :mac_os_x_server => {
50
+ :default => {
51
+ :package => Chef::Provider::Package::Macports,
52
+ :service => Chef::Provider::Service::Macosx,
53
+ :user => Chef::Provider::User::Dscl,
54
+ :group => Chef::Provider::Group::Dscl
55
+ }
118
56
  },
119
- ">= 6.0" => {
120
- :service => Chef::Provider::Service::Insserv
57
+ :freebsd => {
58
+ :default => {
59
+ :group => Chef::Provider::Group::Pw,
60
+ :package => Chef::Provider::Package::Freebsd,
61
+ :service => Chef::Provider::Service::Freebsd,
62
+ :user => Chef::Provider::User::Pw,
63
+ :cron => Chef::Provider::Cron
64
+ }
65
+ },
66
+ :ubuntu => {
67
+ :default => {
68
+ :package => Chef::Provider::Package::Apt,
69
+ :service => Chef::Provider::Service::Debian,
70
+ :cron => Chef::Provider::Cron,
71
+ :mdadm => Chef::Provider::Mdadm
72
+ },
73
+ ">= 11.10" => {
74
+ :ifconfig => Chef::Provider::Ifconfig::Debian
75
+ }
76
+ },
77
+ :gcel => {
78
+ :default => {
79
+ :package => Chef::Provider::Package::Apt,
80
+ :service => Chef::Provider::Service::Debian,
81
+ :cron => Chef::Provider::Cron,
82
+ :mdadm => Chef::Provider::Mdadm
83
+ }
84
+ },
85
+ :linaro => {
86
+ :default => {
87
+ :package => Chef::Provider::Package::Apt,
88
+ :service => Chef::Provider::Service::Debian,
89
+ :cron => Chef::Provider::Cron,
90
+ :mdadm => Chef::Provider::Mdadm
91
+ }
92
+ },
93
+ :raspbian => {
94
+ :default => {
95
+ :package => Chef::Provider::Package::Apt,
96
+ :service => Chef::Provider::Service::Debian,
97
+ :cron => Chef::Provider::Cron,
98
+ :mdadm => Chef::Provider::Mdadm
99
+ }
100
+ },
101
+ :linuxmint => {
102
+ :default => {
103
+ :package => Chef::Provider::Package::Apt,
104
+ :service => Chef::Provider::Service::Upstart,
105
+ :cron => Chef::Provider::Cron,
106
+ :mdadm => Chef::Provider::Mdadm
107
+ }
108
+ },
109
+ :debian => {
110
+ :default => {
111
+ :package => Chef::Provider::Package::Apt,
112
+ :service => Chef::Provider::Service::Debian,
113
+ :cron => Chef::Provider::Cron,
114
+ :mdadm => Chef::Provider::Mdadm
115
+ },
116
+ ">= 6.0" => {
117
+ :service => Chef::Provider::Service::Insserv
118
+ },
119
+ ">= 7.0" => {
120
+ :ifconfig => Chef::Provider::Ifconfig::Debian
121
+ }
122
+ },
123
+ :xenserver => {
124
+ :default => {
125
+ :service => Chef::Provider::Service::Redhat,
126
+ :cron => Chef::Provider::Cron,
127
+ :package => Chef::Provider::Package::Yum,
128
+ :mdadm => Chef::Provider::Mdadm
129
+ }
130
+ },
131
+ :xcp => {
132
+ :default => {
133
+ :service => Chef::Provider::Service::Redhat,
134
+ :cron => Chef::Provider::Cron,
135
+ :package => Chef::Provider::Package::Yum,
136
+ :mdadm => Chef::Provider::Mdadm
137
+ }
138
+ },
139
+ :centos => {
140
+ :default => {
141
+ :service => Chef::Provider::Service::Redhat,
142
+ :cron => Chef::Provider::Cron,
143
+ :package => Chef::Provider::Package::Yum,
144
+ :mdadm => Chef::Provider::Mdadm,
145
+ :ifconfig => Chef::Provider::Ifconfig::Redhat
146
+ }
147
+ },
148
+ :amazon => {
149
+ :default => {
150
+ :service => Chef::Provider::Service::Redhat,
151
+ :cron => Chef::Provider::Cron,
152
+ :package => Chef::Provider::Package::Yum,
153
+ :mdadm => Chef::Provider::Mdadm
154
+ }
155
+ },
156
+ :scientific => {
157
+ :default => {
158
+ :service => Chef::Provider::Service::Redhat,
159
+ :cron => Chef::Provider::Cron,
160
+ :package => Chef::Provider::Package::Yum,
161
+ :mdadm => Chef::Provider::Mdadm
162
+ }
163
+ },
164
+ :fedora => {
165
+ :default => {
166
+ :service => Chef::Provider::Service::Redhat,
167
+ :cron => Chef::Provider::Cron,
168
+ :package => Chef::Provider::Package::Yum,
169
+ :mdadm => Chef::Provider::Mdadm,
170
+ :ifconfig => Chef::Provider::Ifconfig::Redhat
171
+ }
172
+ },
173
+ :opensuse => {
174
+ :default => {
175
+ :service => Chef::Provider::Service::Redhat,
176
+ :cron => Chef::Provider::Cron,
177
+ :package => Chef::Provider::Package::Zypper,
178
+ :group => Chef::Provider::Group::Suse
179
+ },
180
+ # Only OpenSuSE 12.3+ should use the Usermod group provider:
181
+ ">= 12.3" => {
182
+ :group => Chef::Provider::Group::Usermod
183
+ }
184
+ },
185
+ :suse => {
186
+ :default => {
187
+ :service => Chef::Provider::Service::Redhat,
188
+ :cron => Chef::Provider::Cron,
189
+ :package => Chef::Provider::Package::Zypper,
190
+ :group => Chef::Provider::Group::Suse
191
+ }
192
+ },
193
+ :oracle => {
194
+ :default => {
195
+ :service => Chef::Provider::Service::Redhat,
196
+ :cron => Chef::Provider::Cron,
197
+ :package => Chef::Provider::Package::Yum,
198
+ :mdadm => Chef::Provider::Mdadm
199
+ }
200
+ },
201
+ :redhat => {
202
+ :default => {
203
+ :service => Chef::Provider::Service::Redhat,
204
+ :cron => Chef::Provider::Cron,
205
+ :package => Chef::Provider::Package::Yum,
206
+ :mdadm => Chef::Provider::Mdadm,
207
+ :ifconfig => Chef::Provider::Ifconfig::Redhat
208
+ }
209
+ },
210
+ :ibm_powerkvm => {
211
+ :default => {
212
+ :service => Chef::Provider::Service::Redhat,
213
+ :cron => Chef::Provider::Cron,
214
+ :package => Chef::Provider::Package::Yum,
215
+ :mdadm => Chef::Provider::Mdadm,
216
+ :ifconfig => Chef::Provider::Ifconfig::Redhat
217
+ }
218
+ },
219
+ :cloudlinux => {
220
+ :default => {
221
+ :service => Chef::Provider::Service::Redhat,
222
+ :cron => Chef::Provider::Cron,
223
+ :package => Chef::Provider::Package::Yum,
224
+ :mdadm => Chef::Provider::Mdadm,
225
+ :ifconfig => Chef::Provider::Ifconfig::Redhat
226
+ }
227
+ },
228
+ :gentoo => {
229
+ :default => {
230
+ :package => Chef::Provider::Package::Portage,
231
+ :service => Chef::Provider::Service::Gentoo,
232
+ :cron => Chef::Provider::Cron,
233
+ :mdadm => Chef::Provider::Mdadm
234
+ }
235
+ },
236
+ :arch => {
237
+ :default => {
238
+ :package => Chef::Provider::Package::Pacman,
239
+ :service => Chef::Provider::Service::Systemd,
240
+ :cron => Chef::Provider::Cron,
241
+ :mdadm => Chef::Provider::Mdadm
242
+ }
243
+ },
244
+ :mswin => {
245
+ :default => {
246
+ :env => Chef::Provider::Env::Windows,
247
+ :service => Chef::Provider::Service::Windows,
248
+ :user => Chef::Provider::User::Windows,
249
+ :group => Chef::Provider::Group::Windows,
250
+ :mount => Chef::Provider::Mount::Windows,
251
+ :batch => Chef::Provider::Batch,
252
+ :powershell_script => Chef::Provider::PowershellScript
253
+ }
254
+ },
255
+ :mingw32 => {
256
+ :default => {
257
+ :env => Chef::Provider::Env::Windows,
258
+ :service => Chef::Provider::Service::Windows,
259
+ :user => Chef::Provider::User::Windows,
260
+ :group => Chef::Provider::Group::Windows,
261
+ :mount => Chef::Provider::Mount::Windows,
262
+ :batch => Chef::Provider::Batch,
263
+ :powershell_script => Chef::Provider::PowershellScript
264
+ }
265
+ },
266
+ :windows => {
267
+ :default => {
268
+ :env => Chef::Provider::Env::Windows,
269
+ :service => Chef::Provider::Service::Windows,
270
+ :user => Chef::Provider::User::Windows,
271
+ :group => Chef::Provider::Group::Windows,
272
+ :mount => Chef::Provider::Mount::Windows,
273
+ :batch => Chef::Provider::Batch,
274
+ :powershell_script => Chef::Provider::PowershellScript
275
+ }
276
+ },
277
+ :solaris => {},
278
+ :openindiana => {
279
+ :default => {
280
+ :service => Chef::Provider::Service::Solaris,
281
+ :package => Chef::Provider::Package::Ips,
282
+ :cron => Chef::Provider::Cron::Solaris,
283
+ :group => Chef::Provider::Group::Usermod
284
+ }
285
+ },
286
+ :opensolaris => {
287
+ :default => {
288
+ :service => Chef::Provider::Service::Solaris,
289
+ :package => Chef::Provider::Package::Ips,
290
+ :cron => Chef::Provider::Cron::Solaris,
291
+ :group => Chef::Provider::Group::Usermod
292
+ }
293
+ },
294
+ :nexentacore => {
295
+ :default => {
296
+ :service => Chef::Provider::Service::Solaris,
297
+ :package => Chef::Provider::Package::Solaris,
298
+ :cron => Chef::Provider::Cron::Solaris,
299
+ :group => Chef::Provider::Group::Usermod
300
+ }
301
+ },
302
+ :omnios => {
303
+ :default => {
304
+ :service => Chef::Provider::Service::Solaris,
305
+ :package => Chef::Provider::Package::Ips,
306
+ :cron => Chef::Provider::Cron::Solaris,
307
+ :group => Chef::Provider::Group::Usermod,
308
+ :user => Chef::Provider::User::Solaris,
309
+ }
310
+ },
311
+ :solaris2 => {
312
+ :default => {
313
+ :service => Chef::Provider::Service::Solaris,
314
+ :package => Chef::Provider::Package::Ips,
315
+ :cron => Chef::Provider::Cron::Solaris,
316
+ :group => Chef::Provider::Group::Usermod,
317
+ :user => Chef::Provider::User::Solaris,
318
+ },
319
+ "< 5.11" => {
320
+ :service => Chef::Provider::Service::Solaris,
321
+ :package => Chef::Provider::Package::Solaris,
322
+ :cron => Chef::Provider::Cron::Solaris,
323
+ :group => Chef::Provider::Group::Usermod,
324
+ :user => Chef::Provider::User::Solaris,
325
+ }
326
+ },
327
+ :smartos => {
328
+ :default => {
329
+ :service => Chef::Provider::Service::Solaris,
330
+ :package => Chef::Provider::Package::SmartOS,
331
+ :cron => Chef::Provider::Cron::Solaris,
332
+ :group => Chef::Provider::Group::Usermod
333
+ }
334
+ },
335
+ :netbsd => {
336
+ :default => {
337
+ :service => Chef::Provider::Service::Freebsd,
338
+ :group => Chef::Provider::Group::Groupmod
339
+ }
340
+ },
341
+ :openbsd => {
342
+ :default => {
343
+ :group => Chef::Provider::Group::Usermod
344
+ }
345
+ },
346
+ :hpux => {
347
+ :default => {
348
+ :group => Chef::Provider::Group::Usermod
349
+ }
350
+ },
351
+ :aix => {
352
+ :default => {
353
+ :group => Chef::Provider::Group::Aix,
354
+ :mount => Chef::Provider::Mount::Aix,
355
+ :ifconfig => Chef::Provider::Ifconfig::Aix,
356
+ :cron => Chef::Provider::Cron::Aix,
357
+ :package => Chef::Provider::Package::Aix
358
+ }
121
359
  },
122
- ">= 7.0" => {
123
- :ifconfig => Chef::Provider::Ifconfig::Debian
124
- }
125
- },
126
- :xenserver => {
127
- :default => {
128
- :service => Chef::Provider::Service::Redhat,
129
- :cron => Chef::Provider::Cron,
130
- :package => Chef::Provider::Package::Yum,
131
- :mdadm => Chef::Provider::Mdadm
132
- }
133
- },
134
- :xcp => {
135
- :default => {
136
- :service => Chef::Provider::Service::Redhat,
137
- :cron => Chef::Provider::Cron,
138
- :package => Chef::Provider::Package::Yum,
139
- :mdadm => Chef::Provider::Mdadm
140
- }
141
- },
142
- :centos => {
143
- :default => {
144
- :service => Chef::Provider::Service::Redhat,
145
- :cron => Chef::Provider::Cron,
146
- :package => Chef::Provider::Package::Yum,
147
- :mdadm => Chef::Provider::Mdadm,
148
- :ifconfig => Chef::Provider::Ifconfig::Redhat
149
- }
150
- },
151
- :amazon => {
152
- :default => {
153
- :service => Chef::Provider::Service::Redhat,
154
- :cron => Chef::Provider::Cron,
155
- :package => Chef::Provider::Package::Yum,
156
- :mdadm => Chef::Provider::Mdadm
157
- }
158
- },
159
- :scientific => {
160
- :default => {
161
- :service => Chef::Provider::Service::Redhat,
162
- :cron => Chef::Provider::Cron,
163
- :package => Chef::Provider::Package::Yum,
164
- :mdadm => Chef::Provider::Mdadm
165
- }
166
- },
167
- :fedora => {
168
- :default => {
169
- :service => Chef::Provider::Service::Redhat,
170
- :cron => Chef::Provider::Cron,
171
- :package => Chef::Provider::Package::Yum,
172
- :mdadm => Chef::Provider::Mdadm,
173
- :ifconfig => Chef::Provider::Ifconfig::Redhat
174
- }
175
- },
176
- :opensuse => {
177
- :default => {
178
- :service => Chef::Provider::Service::Redhat,
179
- :cron => Chef::Provider::Cron,
180
- :package => Chef::Provider::Package::Zypper,
181
- :group => Chef::Provider::Group::Suse
182
- },
183
- # Only OpenSuSE 12.3+ should use the Usermod group provider:
184
- ">= 12.3" => {
185
- :group => Chef::Provider::Group::Usermod
186
- }
187
- },
188
- :suse => {
189
- :default => {
190
- :service => Chef::Provider::Service::Redhat,
191
- :cron => Chef::Provider::Cron,
192
- :package => Chef::Provider::Package::Zypper,
193
- :group => Chef::Provider::Group::Suse
194
- }
195
- },
196
- :oracle => {
197
- :default => {
198
- :service => Chef::Provider::Service::Redhat,
199
- :cron => Chef::Provider::Cron,
200
- :package => Chef::Provider::Package::Yum,
201
- :mdadm => Chef::Provider::Mdadm
202
- }
203
- },
204
- :redhat => {
205
- :default => {
206
- :service => Chef::Provider::Service::Redhat,
207
- :cron => Chef::Provider::Cron,
208
- :package => Chef::Provider::Package::Yum,
209
- :mdadm => Chef::Provider::Mdadm,
210
- :ifconfig => Chef::Provider::Ifconfig::Redhat
211
- }
212
- },
213
- :ibm_powerkvm => {
214
- :default => {
215
- :service => Chef::Provider::Service::Redhat,
216
- :cron => Chef::Provider::Cron,
217
- :package => Chef::Provider::Package::Yum,
218
- :mdadm => Chef::Provider::Mdadm,
219
- :ifconfig => Chef::Provider::Ifconfig::Redhat
220
- }
221
- },
222
- :gentoo => {
223
- :default => {
224
- :package => Chef::Provider::Package::Portage,
225
- :service => Chef::Provider::Service::Gentoo,
226
- :cron => Chef::Provider::Cron,
227
- :mdadm => Chef::Provider::Mdadm
228
- }
229
- },
230
- :arch => {
231
- :default => {
232
- :package => Chef::Provider::Package::Pacman,
233
- :service => Chef::Provider::Service::Systemd,
234
- :cron => Chef::Provider::Cron,
235
- :mdadm => Chef::Provider::Mdadm
236
- }
237
- },
238
- :mswin => {
239
- :default => {
240
- :env => Chef::Provider::Env::Windows,
241
- :service => Chef::Provider::Service::Windows,
242
- :user => Chef::Provider::User::Windows,
243
- :group => Chef::Provider::Group::Windows,
244
- :mount => Chef::Provider::Mount::Windows,
245
- :batch => Chef::Provider::Batch,
246
- :powershell_script => Chef::Provider::PowershellScript
247
- }
248
- },
249
- :mingw32 => {
250
- :default => {
251
- :env => Chef::Provider::Env::Windows,
252
- :service => Chef::Provider::Service::Windows,
253
- :user => Chef::Provider::User::Windows,
254
- :group => Chef::Provider::Group::Windows,
255
- :mount => Chef::Provider::Mount::Windows,
256
- :batch => Chef::Provider::Batch,
257
- :powershell_script => Chef::Provider::PowershellScript
258
- }
259
- },
260
- :windows => {
261
- :default => {
262
- :env => Chef::Provider::Env::Windows,
263
- :service => Chef::Provider::Service::Windows,
264
- :user => Chef::Provider::User::Windows,
265
- :group => Chef::Provider::Group::Windows,
266
- :mount => Chef::Provider::Mount::Windows,
267
- :batch => Chef::Provider::Batch,
268
- :powershell_script => Chef::Provider::PowershellScript
269
- }
270
- },
271
- :solaris => {},
272
- :openindiana => {
273
- :default => {
274
- :service => Chef::Provider::Service::Solaris,
275
- :package => Chef::Provider::Package::Ips,
276
- :cron => Chef::Provider::Cron::Solaris,
277
- :group => Chef::Provider::Group::Usermod
278
- }
279
- },
280
- :opensolaris => {
281
- :default => {
282
- :service => Chef::Provider::Service::Solaris,
283
- :package => Chef::Provider::Package::Ips,
284
- :cron => Chef::Provider::Cron::Solaris,
285
- :group => Chef::Provider::Group::Usermod
286
- }
287
- },
288
- :nexentacore => {
289
- :default => {
290
- :service => Chef::Provider::Service::Solaris,
291
- :package => Chef::Provider::Package::Solaris,
292
- :cron => Chef::Provider::Cron::Solaris,
293
- :group => Chef::Provider::Group::Usermod
294
- }
295
- },
296
- :omnios => {
297
- :default => {
298
- :service => Chef::Provider::Service::Solaris,
299
- :package => Chef::Provider::Package::Ips,
300
- :cron => Chef::Provider::Cron::Solaris,
301
- :group => Chef::Provider::Group::Usermod,
302
- :user => Chef::Provider::User::Solaris,
303
- }
304
- },
305
- :solaris2 => {
306
- :default => {
307
- :service => Chef::Provider::Service::Solaris,
308
- :package => Chef::Provider::Package::Ips,
309
- :cron => Chef::Provider::Cron::Solaris,
310
- :group => Chef::Provider::Group::Usermod,
311
- :user => Chef::Provider::User::Solaris,
312
- },
313
- "< 5.11" => {
314
- :service => Chef::Provider::Service::Solaris,
315
- :package => Chef::Provider::Package::Solaris,
316
- :cron => Chef::Provider::Cron::Solaris,
317
- :group => Chef::Provider::Group::Usermod,
318
- :user => Chef::Provider::User::Solaris,
319
- }
320
- },
321
- :smartos => {
322
- :default => {
323
- :service => Chef::Provider::Service::Solaris,
324
- :package => Chef::Provider::Package::SmartOS,
325
- :cron => Chef::Provider::Cron::Solaris,
326
- :group => Chef::Provider::Group::Usermod
327
- }
328
- },
329
- :netbsd => {
330
- :default => {
331
- :service => Chef::Provider::Service::Freebsd,
332
- :group => Chef::Provider::Group::Groupmod
333
- }
334
- },
335
- :openbsd => {
336
- :default => {
337
- :group => Chef::Provider::Group::Usermod
338
- }
339
- },
340
- :hpux => {
341
- :default => {
342
- :group => Chef::Provider::Group::Usermod
343
- }
344
- },
345
- :aix => {
346
360
  :default => {
347
- :group => Chef::Provider::Group::Aix,
348
- :mount => Chef::Provider::Mount::Aix,
349
- :ifconfig => Chef::Provider::Ifconfig::Aix,
350
- :cron => Chef::Provider::Cron::Aix,
351
- :package => Chef::Provider::Package::Aix
361
+ :file => Chef::Provider::File,
362
+ :directory => Chef::Provider::Directory,
363
+ :link => Chef::Provider::Link,
364
+ :template => Chef::Provider::Template,
365
+ :remote_directory => Chef::Provider::RemoteDirectory,
366
+ :execute => Chef::Provider::Execute,
367
+ :mount => Chef::Provider::Mount::Mount,
368
+ :script => Chef::Provider::Script,
369
+ :service => Chef::Provider::Service::Init,
370
+ :perl => Chef::Provider::Script,
371
+ :python => Chef::Provider::Script,
372
+ :ruby => Chef::Provider::Script,
373
+ :bash => Chef::Provider::Script,
374
+ :csh => Chef::Provider::Script,
375
+ :user => Chef::Provider::User::Useradd,
376
+ :group => Chef::Provider::Group::Gpasswd,
377
+ :http_request => Chef::Provider::HttpRequest,
378
+ :route => Chef::Provider::Route,
379
+ :ifconfig => Chef::Provider::Ifconfig,
380
+ :ruby_block => Chef::Provider::RubyBlock,
381
+ :whyrun_safe_ruby_block => Chef::Provider::WhyrunSafeRubyBlock,
382
+ :erl_call => Chef::Provider::ErlCall,
383
+ :log => Chef::Provider::Log::ChefLog
352
384
  }
353
- },
354
- :default => {
355
- :file => Chef::Provider::File,
356
- :directory => Chef::Provider::Directory,
357
- :link => Chef::Provider::Link,
358
- :template => Chef::Provider::Template,
359
- :remote_directory => Chef::Provider::RemoteDirectory,
360
- :execute => Chef::Provider::Execute,
361
- :mount => Chef::Provider::Mount::Mount,
362
- :script => Chef::Provider::Script,
363
- :service => Chef::Provider::Service::Init,
364
- :perl => Chef::Provider::Script,
365
- :python => Chef::Provider::Script,
366
- :ruby => Chef::Provider::Script,
367
- :bash => Chef::Provider::Script,
368
- :csh => Chef::Provider::Script,
369
- :user => Chef::Provider::User::Useradd,
370
- :group => Chef::Provider::Group::Gpasswd,
371
- :http_request => Chef::Provider::HttpRequest,
372
- :route => Chef::Provider::Route,
373
- :ifconfig => Chef::Provider::Ifconfig,
374
- :ruby_block => Chef::Provider::RubyBlock,
375
- :whyrun_safe_ruby_block => Chef::Provider::WhyrunSafeRubyBlock,
376
- :erl_call => Chef::Provider::ErlCall,
377
- :log => Chef::Provider::Log::ChefLog
378
385
  }
379
- }
386
+ end
380
387
  end
381
388
 
382
389
  include Chef::Mixin::ParamsValidate