chef 0.8.16 → 0.9.0.a3
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of chef might be problematic. Click here for more details.
- data/bin/shef +1 -0
- data/distro/common/man/man1/chef-server-webui.1 +106 -0
- data/distro/common/man/man1/chef-server.1 +0 -1
- data/distro/common/man/man1/chef-solr-indexer.1 +55 -0
- data/distro/common/man/man1/chef-solr.1 +55 -0
- data/distro/common/man/man8/chef-client.8 +4 -2
- data/distro/common/man/man8/chef-solo.8 +1 -2
- data/distro/common/man/man8/chef-solr-rebuild.8 +37 -0
- data/distro/common/man/man8/knife.8 +668 -266
- data/distro/common/man/man8/shef.8 +45 -0
- data/distro/common/markdown/README +3 -0
- data/distro/common/markdown/knife.mkd +520 -0
- data/distro/debian/etc/default/chef-client +4 -0
- data/distro/debian/etc/default/chef-server +6 -0
- data/distro/debian/etc/default/chef-server-webui +6 -0
- data/distro/debian/etc/default/chef-solr +4 -0
- data/distro/debian/etc/default/chef-solr-indexer +4 -0
- data/distro/debian/etc/init.d/chef-client +41 -41
- data/distro/debian/etc/init.d/chef-server +10 -10
- data/distro/debian/etc/init.d/chef-server-webui +121 -0
- data/distro/debian/etc/init.d/chef-solr +177 -0
- data/distro/debian/etc/init.d/chef-solr-indexer +176 -0
- data/distro/redhat/etc/init.d/chef-client +76 -48
- data/distro/redhat/etc/init.d/chef-server +85 -51
- data/distro/redhat/etc/init.d/chef-server-webui +85 -51
- data/distro/redhat/etc/init.d/chef-solr +77 -49
- data/distro/redhat/etc/init.d/chef-solr-indexer +77 -48
- data/distro/redhat/etc/logrotate.d/chef-client +8 -0
- data/distro/redhat/etc/logrotate.d/chef-server +8 -0
- data/distro/redhat/etc/logrotate.d/chef-server-webui +8 -0
- data/distro/redhat/etc/logrotate.d/chef-solr +8 -0
- data/distro/redhat/etc/logrotate.d/chef-solr-indexer +8 -0
- data/distro/redhat/etc/sysconfig/chef-client +9 -4
- data/distro/redhat/etc/sysconfig/chef-server +10 -6
- data/distro/redhat/etc/sysconfig/chef-server-webui +10 -6
- data/distro/redhat/etc/sysconfig/chef-solr +3 -4
- data/distro/redhat/etc/sysconfig/chef-solr-indexer +3 -3
- data/lib/chef.rb +16 -5
- data/lib/chef/application/knife.rb +2 -2
- data/lib/chef/application/solo.rb +1 -7
- data/lib/chef/cache/checksum.rb +12 -5
- data/lib/chef/cache/file_cache_by_checksum.rb +52 -0
- data/lib/chef/checksum.rb +115 -0
- data/lib/chef/client.rb +193 -185
- data/lib/chef/config.rb +9 -1
- data/lib/chef/cookbook/cookbook_collection.rb +43 -0
- data/lib/chef/cookbook/file_system_file_vendor.rb +53 -0
- data/lib/chef/cookbook/file_vendor.rb +47 -0
- data/lib/chef/cookbook/metadata.rb +34 -35
- data/lib/chef/cookbook/metadata/version.rb +1 -1
- data/lib/chef/cookbook_loader.rb +70 -45
- data/lib/chef/cookbook_version.rb +760 -0
- data/lib/chef/couchdb.rb +8 -5
- data/lib/chef/data_bag_item.rb +5 -5
- data/lib/chef/exceptions.rb +10 -0
- data/lib/chef/file_access_control.rb +134 -0
- data/lib/chef/handler.rb +62 -0
- data/lib/chef/handler/json_file.rb +47 -0
- data/lib/chef/knife.rb +14 -2
- data/lib/chef/knife/bootstrap.rb +126 -0
- data/lib/chef/knife/cookbook_bulk_delete.rb +1 -1
- data/lib/chef/knife/cookbook_delete.rb +4 -4
- data/lib/chef/knife/cookbook_download.rb +57 -26
- data/lib/chef/knife/cookbook_metadata.rb +2 -2
- data/lib/chef/knife/cookbook_show.rb +30 -11
- data/lib/chef/knife/cookbook_upload.rb +113 -86
- data/lib/chef/knife/ec2_server_create.rb +146 -0
- data/lib/chef/knife/ec2_server_delete.rb +84 -0
- data/lib/chef/knife/ec2_server_list.rb +82 -0
- data/lib/chef/knife/status.rb +51 -0
- data/lib/chef/mixin/language_include_attribute.rb +16 -11
- data/lib/chef/mixin/language_include_recipe.rb +15 -16
- data/lib/chef/mixin/recipe_definition_dsl_core.rb +17 -20
- data/lib/chef/mixin/shell_out.rb +38 -0
- data/lib/chef/mixins.rb +1 -1
- data/lib/chef/node.rb +190 -63
- data/lib/chef/node/attribute.rb +92 -78
- data/lib/chef/platform.rb +24 -4
- data/lib/chef/provider.rb +28 -10
- data/lib/chef/provider/breakpoint.rb +2 -2
- data/lib/chef/provider/cookbook_file.rb +96 -0
- data/lib/chef/provider/cron.rb +2 -2
- data/lib/chef/provider/deploy.rb +12 -10
- data/lib/chef/provider/env.rb +152 -0
- data/lib/chef/provider/env/windows.rb +75 -0
- data/lib/chef/provider/file.rb +10 -14
- data/lib/chef/provider/group.rb +15 -2
- data/lib/chef/provider/group/dscl.rb +17 -25
- data/lib/chef/provider/group/gpasswd.rb +6 -3
- data/lib/chef/provider/group/pw.rb +3 -7
- data/lib/chef/provider/group/windows.rb +79 -0
- data/lib/chef/provider/link.rb +4 -5
- data/lib/chef/provider/mdadm.rb +25 -18
- data/lib/chef/provider/mount/mount.rb +28 -27
- data/lib/chef/provider/package.rb +35 -35
- data/lib/chef/provider/package/dpkg.rb +13 -10
- data/lib/chef/provider/package/easy_install.rb +6 -6
- data/lib/chef/provider/package/freebsd.rb +17 -51
- data/lib/chef/provider/package/rpm.rb +1 -1
- data/lib/chef/provider/package/rubygems.rb +391 -74
- data/lib/chef/provider/package/yum.rb +2 -2
- data/lib/chef/provider/package/zypper.rb +2 -1
- data/lib/chef/provider/remote_directory.rb +60 -83
- data/lib/chef/provider/remote_file.rb +17 -66
- data/lib/chef/provider/script.rb +20 -9
- data/lib/chef/provider/service.rb +23 -30
- data/lib/chef/provider/service/arch.rb +3 -3
- data/lib/chef/provider/service/debian.rb +22 -17
- data/lib/chef/provider/service/freebsd.rb +4 -4
- data/lib/chef/provider/service/init.rb +2 -2
- data/lib/chef/provider/service/redhat.rb +14 -16
- data/lib/chef/provider/service/simple.rb +7 -3
- data/lib/chef/provider/service/solaris.rb +85 -0
- data/lib/chef/provider/service/upstart.rb +12 -7
- data/lib/chef/provider/service/windows.rb +2 -2
- data/lib/chef/provider/template.rb +133 -118
- data/lib/chef/provider/user.rb +34 -17
- data/lib/chef/provider/user/dscl.rb +117 -114
- data/lib/chef/provider/user/windows.rb +124 -0
- data/lib/chef/providers.rb +7 -0
- data/lib/chef/recipe.rb +39 -20
- data/lib/chef/resource.rb +47 -52
- data/lib/chef/resource/apt_package.rb +4 -4
- data/lib/chef/resource/bash.rb +4 -4
- data/lib/chef/resource/cookbook_file.rb +45 -0
- data/lib/chef/resource/cron.rb +3 -3
- data/lib/chef/resource/csh.rb +4 -4
- data/lib/chef/resource/deploy.rb +3 -3
- data/lib/chef/resource/directory.rb +4 -4
- data/lib/chef/resource/dpkg_package.rb +4 -4
- data/lib/chef/resource/easy_install_package.rb +3 -3
- data/lib/chef/resource/env.rb +58 -0
- data/lib/chef/resource/erl_call.rb +3 -3
- data/lib/chef/resource/execute.rb +3 -3
- data/lib/chef/resource/file.rb +3 -3
- data/lib/chef/resource/freebsd_package.rb +3 -3
- data/lib/chef/resource/gem_package.rb +17 -9
- data/lib/chef/resource/git.rb +3 -3
- data/lib/chef/resource/group.rb +3 -3
- data/lib/chef/resource/http_request.rb +4 -4
- data/lib/chef/resource/ifconfig.rb +3 -3
- data/lib/chef/resource/link.rb +3 -3
- data/lib/chef/resource/log.rb +2 -2
- data/lib/chef/resource/macports_package.rb +2 -2
- data/lib/chef/resource/mdadm.rb +3 -3
- data/lib/chef/resource/mount.rb +2 -2
- data/lib/chef/resource/package.rb +4 -4
- data/lib/chef/resource/pacman_package.rb +4 -4
- data/lib/chef/resource/perl.rb +4 -4
- data/lib/chef/resource/portage_package.rb +4 -4
- data/lib/chef/resource/python.rb +4 -4
- data/lib/chef/resource/remote_directory.rb +3 -3
- data/lib/chef/resource/remote_file.rb +26 -3
- data/lib/chef/resource/route.rb +3 -3
- data/lib/chef/resource/ruby.rb +3 -3
- data/lib/chef/resource/ruby_block.rb +3 -2
- data/lib/chef/resource/scm.rb +7 -5
- data/lib/chef/resource/script.rb +4 -4
- data/lib/chef/resource/service.rb +3 -3
- data/lib/chef/resource/subversion.rb +4 -2
- data/lib/chef/resource/template.rb +3 -3
- data/lib/chef/resource/user.rb +3 -3
- data/lib/chef/resource/yum_package.rb +3 -3
- data/lib/chef/resource_collection.rb +9 -5
- data/lib/chef/resources.rb +2 -0
- data/lib/chef/rest.rb +4 -0
- data/lib/chef/role.rb +2 -0
- data/lib/chef/run_context.rb +108 -0
- data/lib/chef/run_list.rb +75 -98
- data/lib/chef/run_list/run_list_expansion.rb +156 -0
- data/lib/chef/run_list/run_list_item.rb +71 -0
- data/lib/chef/runner.rb +58 -61
- data/lib/chef/sandbox.rb +147 -0
- data/lib/chef/shef.rb +4 -3
- data/lib/chef/shef/ext.rb +12 -4
- data/lib/chef/shef/shef_session.rb +27 -23
- data/lib/chef/shell_out.rb +375 -0
- data/lib/chef/util/windows.rb +56 -0
- data/lib/chef/util/windows/net_group.rb +101 -0
- data/lib/chef/util/windows/net_user.rb +198 -0
- data/lib/chef/version.rb +20 -0
- metadata +112 -22
- data/lib/chef/compile.rb +0 -158
- data/lib/chef/cookbook.rb +0 -201
- data/lib/chef/mixin/generate_url.rb +0 -58
data/lib/chef/resource/deploy.rb
CHANGED
@@ -51,9 +51,9 @@ class Chef
|
|
51
51
|
class Deploy < Chef::Resource
|
52
52
|
|
53
53
|
provider_base Chef::Provider::Deploy
|
54
|
-
|
55
|
-
def initialize(name,
|
56
|
-
super
|
54
|
+
|
55
|
+
def initialize(name, run_context=nil)
|
56
|
+
super
|
57
57
|
@resource_name = :deploy
|
58
58
|
@deploy_to = name
|
59
59
|
@environment = nil
|
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Directory < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :directory
|
28
28
|
@path = name
|
29
29
|
@action = :create
|
@@ -73,4 +73,4 @@ class Chef
|
|
73
73
|
|
74
74
|
end
|
75
75
|
end
|
76
|
-
end
|
76
|
+
end
|
@@ -22,13 +22,13 @@ require 'chef/provider/package/dpkg'
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
24
|
class DpkgPackage < Chef::Resource::Package
|
25
|
-
|
26
|
-
def initialize(name,
|
27
|
-
super
|
25
|
+
|
26
|
+
def initialize(name, run_context=nil)
|
27
|
+
super
|
28
28
|
@resource_name = :dpkg_package
|
29
29
|
@provider = Chef::Provider::Package::Dpkg
|
30
30
|
end
|
31
31
|
|
32
32
|
end
|
33
33
|
end
|
34
|
-
end
|
34
|
+
end
|
@@ -21,9 +21,9 @@ require 'chef/resource/package'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class EasyInstallPackage < Chef::Resource::Package
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :easy_install_package
|
28
28
|
@provider = Chef::Provider::Package::EasyInstall
|
29
29
|
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# Author:: Doug MacEachern (<dougm@vmware.com>)
|
3
|
+
# Copyright:: Copyright (c) 2010 VMware, Inc.
|
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
|
+
class Chef
|
20
|
+
class Resource
|
21
|
+
class Env < Chef::Resource
|
22
|
+
|
23
|
+
def initialize(name, run_context=nil)
|
24
|
+
super
|
25
|
+
@resource_name = :env
|
26
|
+
@key_name = name
|
27
|
+
@value = nil
|
28
|
+
@action = :create
|
29
|
+
@delim = nil
|
30
|
+
@allowed_actions.push(:create, :delete, :modify)
|
31
|
+
end
|
32
|
+
|
33
|
+
def key_name(arg=nil)
|
34
|
+
set_or_return(
|
35
|
+
:key_name,
|
36
|
+
arg,
|
37
|
+
:kind_of => [ String ]
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
def value(arg=nil)
|
42
|
+
set_or_return(
|
43
|
+
:value,
|
44
|
+
arg,
|
45
|
+
:kind_of => [ String ]
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
def delim(arg=nil)
|
50
|
+
set_or_return(
|
51
|
+
:delim,
|
52
|
+
arg,
|
53
|
+
:kind_of => [ String ]
|
54
|
+
)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -23,9 +23,9 @@ class Chef
|
|
23
23
|
class ErlCall < Chef::Resource
|
24
24
|
|
25
25
|
# erl_call : http://erlang.org/doc/man/erl_call.html
|
26
|
-
|
27
|
-
def initialize(name,
|
28
|
-
super
|
26
|
+
|
27
|
+
def initialize(name, run_context=nil)
|
28
|
+
super
|
29
29
|
@resource_name = :erl_call
|
30
30
|
|
31
31
|
@code = "q()." # your erlang code goes here
|
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Execute < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :execute
|
28
28
|
@command = name
|
29
29
|
@backup = 5
|
data/lib/chef/resource/file.rb
CHANGED
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class File < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :file
|
28
28
|
@path = name
|
29
29
|
@backup = 5
|
@@ -22,9 +22,9 @@ require 'chef/provider/package/freebsd'
|
|
22
22
|
class Chef
|
23
23
|
class Resource
|
24
24
|
class FreebsdPackage < Chef::Resource::Package
|
25
|
-
|
26
|
-
def initialize(name,
|
27
|
-
super
|
25
|
+
|
26
|
+
def initialize(name, run_context=nil)
|
27
|
+
super
|
28
28
|
@resource_name = :freebsd_package
|
29
29
|
@provider = Chef::Provider::Package::Freebsd
|
30
30
|
end
|
@@ -21,21 +21,29 @@ require 'chef/resource/package'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class GemPackage < Chef::Resource::Package
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :gem_package
|
28
28
|
@provider = Chef::Provider::Package::Rubygems
|
29
29
|
end
|
30
30
|
|
31
31
|
# Sets a custom gem_binary to run for gem commands.
|
32
|
-
def gem_binary(
|
33
|
-
set_or_return(
|
34
|
-
:gem_binary,
|
35
|
-
arg,
|
36
|
-
:kind_of => [ String ]
|
37
|
-
)
|
32
|
+
def gem_binary(gem_cmd=nil)
|
33
|
+
set_or_return(:gem_binary,gem_cmd,:kind_of => [ String ])
|
38
34
|
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Options for the gem install, either a Hash or a String. When a hash is
|
38
|
+
# given, the options are passed to Gem::DependencyInstaller.new, and the
|
39
|
+
# gem will be installed via the gems API. When a String is given, the gem
|
40
|
+
# will be installed by shelling out to the gem command. Using a Hash of
|
41
|
+
# options with an explicit gem_binary will result in undefined behavior.
|
42
|
+
def options(opts=nil)
|
43
|
+
set_or_return(:options,opts,:kind_of => [String,Hash])
|
44
|
+
end
|
45
|
+
|
46
|
+
|
39
47
|
end
|
40
48
|
end
|
41
49
|
end
|
data/lib/chef/resource/git.rb
CHANGED
@@ -22,8 +22,8 @@ class Chef
|
|
22
22
|
class Resource
|
23
23
|
class Git < Chef::Resource::Scm
|
24
24
|
|
25
|
-
def initialize(name,
|
26
|
-
super
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :git
|
28
28
|
@provider = Chef::Provider::Git
|
29
29
|
end
|
@@ -33,4 +33,4 @@ class Chef
|
|
33
33
|
|
34
34
|
end
|
35
35
|
end
|
36
|
-
end
|
36
|
+
end
|
data/lib/chef/resource/group.rb
CHANGED
@@ -19,9 +19,9 @@
|
|
19
19
|
class Chef
|
20
20
|
class Resource
|
21
21
|
class Group < Chef::Resource
|
22
|
-
|
23
|
-
def initialize(name,
|
24
|
-
super
|
22
|
+
|
23
|
+
def initialize(name, run_context=nil)
|
24
|
+
super
|
25
25
|
@resource_name = :group
|
26
26
|
@group_name = name
|
27
27
|
@gid = nil
|
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class HttpRequest < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :http_request
|
28
28
|
@message = name
|
29
29
|
@url = nil
|
@@ -49,4 +49,4 @@ class Chef
|
|
49
49
|
|
50
50
|
end
|
51
51
|
end
|
52
|
-
end
|
52
|
+
end
|
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Ifconfig < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :ifconfig
|
28
28
|
@target = name
|
29
29
|
@action = :add
|
data/lib/chef/resource/link.rb
CHANGED
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Link < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :link
|
28
28
|
@to = nil
|
29
29
|
@action = :create
|
data/lib/chef/resource/log.rb
CHANGED
@@ -39,8 +39,8 @@ class Chef
|
|
39
39
|
# name<String>:: Message to log
|
40
40
|
# collection<Array>:: Collection of included recipes
|
41
41
|
# node<Chef::Node>:: Node where resource will be used
|
42
|
-
def initialize(name,
|
43
|
-
super
|
42
|
+
def initialize(name, run_context=nil)
|
43
|
+
super
|
44
44
|
@resource_name = :log
|
45
45
|
@level = :info
|
46
46
|
@action = :write
|
@@ -19,8 +19,8 @@
|
|
19
19
|
class Chef
|
20
20
|
class Resource
|
21
21
|
class MacportsPackage < Chef::Resource::Package
|
22
|
-
def initialize(name,
|
23
|
-
super
|
22
|
+
def initialize(name, run_context=nil)
|
23
|
+
super
|
24
24
|
@resource_name = :macports_package
|
25
25
|
@provider = Chef::Provider::Package::Macports
|
26
26
|
end
|
data/lib/chef/resource/mdadm.rb
CHANGED
@@ -21,9 +21,9 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Mdadm < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :mdadm
|
28
28
|
|
29
29
|
@chunk = 16
|
data/lib/chef/resource/mount.rb
CHANGED
@@ -22,8 +22,8 @@ class Chef
|
|
22
22
|
class Resource
|
23
23
|
class Mount < Chef::Resource
|
24
24
|
|
25
|
-
def initialize(name,
|
26
|
-
super
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :mount
|
28
28
|
@mount_point = name
|
29
29
|
@device = nil
|
@@ -21,16 +21,16 @@ require 'chef/resource'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Package < Chef::Resource
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :package
|
28
28
|
@package_name = name
|
29
29
|
@version = nil
|
30
30
|
@candidate_version = nil
|
31
31
|
@response_file = nil
|
32
32
|
@source = nil
|
33
|
-
@action =
|
33
|
+
@action = :install
|
34
34
|
@options = nil
|
35
35
|
@allowed_actions.push(:install, :upgrade, :remove, :purge)
|
36
36
|
end
|
@@ -21,13 +21,13 @@ require 'chef/resource/package'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class PacmanPackage < Chef::Resource::Package
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :pacman_package
|
28
28
|
@provider = Chef::Provider::Package::Pacman
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
data/lib/chef/resource/perl.rb
CHANGED
@@ -21,13 +21,13 @@ require 'chef/resource/script'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Perl < Chef::Resource::Script
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :perl
|
28
28
|
@interpreter = "perl"
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
@@ -21,13 +21,13 @@ require 'chef/resource/package'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class PortagePackage < Chef::Resource::Package
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :portage_package
|
28
28
|
@provider = Chef::Provider::Package::Portage
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
data/lib/chef/resource/python.rb
CHANGED
@@ -21,13 +21,13 @@ require 'chef/resource/script'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class Python < Chef::Resource::Script
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :python
|
28
28
|
@interpreter = "python"
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
32
32
|
end
|
33
|
-
end
|
33
|
+
end
|
@@ -21,9 +21,9 @@ require 'chef/resource/directory'
|
|
21
21
|
class Chef
|
22
22
|
class Resource
|
23
23
|
class RemoteDirectory < Chef::Resource::Directory
|
24
|
-
|
25
|
-
def initialize(name,
|
26
|
-
super
|
24
|
+
|
25
|
+
def initialize(name, run_context=nil)
|
26
|
+
super
|
27
27
|
@resource_name = :remote_directory
|
28
28
|
@path = name
|
29
29
|
@source = ::File.basename(name)
|