puppet 0.23.0 → 0.23.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CHANGELOG +58 -0
- data/Rakefile +1 -1
- data/bin/filebucket +6 -6
- data/bin/puppetca +11 -1
- data/bin/puppetmasterd +7 -6
- data/conf/redhat/client.init +1 -0
- data/conf/redhat/{puppetd.conf → puppet.conf} +1 -1
- data/conf/redhat/puppet.spec +43 -31
- data/conf/redhat/server.init +1 -0
- data/lib/puppet.rb +3 -3
- data/lib/puppet/configuration.rb +16 -5
- data/lib/puppet/metatype/attributes.rb +12 -19
- data/lib/puppet/metatype/evaluation.rb +10 -1
- data/lib/puppet/metatype/instances.rb +39 -15
- data/lib/puppet/metatype/manager.rb +1 -28
- data/lib/puppet/metatype/metaparams.rb +20 -16
- data/lib/puppet/metatype/providers.rb +8 -2
- data/lib/puppet/metatype/schedules.rb +14 -19
- data/lib/puppet/{modules.rb → module.rb} +2 -0
- data/lib/puppet/network/authstore.rb +5 -1
- data/lib/puppet/network/client/dipper.rb +2 -2
- data/lib/puppet/network/client/master.rb +18 -9
- data/lib/puppet/network/handler/fileserver.rb +3 -6
- data/lib/puppet/network/handler/report.rb +2 -1
- data/lib/puppet/network/server/mongrel.rb +4 -2
- data/lib/puppet/network/xmlrpc/client.rb +10 -3
- data/lib/puppet/parameter.rb +11 -4
- data/lib/puppet/parser/ast/collexpr.rb +10 -10
- data/lib/puppet/parser/ast/hostclass.rb +2 -2
- data/lib/puppet/parser/ast/resourceparam.rb +4 -3
- data/lib/puppet/parser/ast/resourceref.rb +16 -2
- data/lib/puppet/parser/collector.rb +8 -4
- data/lib/puppet/parser/functions.rb +5 -2
- data/lib/puppet/parser/interpreter.rb +48 -9
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/parser.rb +669 -589
- data/lib/puppet/parser/resource.rb +20 -11
- data/lib/puppet/parser/resource/param.rb +21 -10
- data/lib/puppet/parser/resource/reference.rb +2 -2
- data/lib/puppet/parser/scope.rb +22 -10
- data/lib/puppet/{type/property.rb → property.rb} +48 -15
- data/lib/puppet/propertychange.rb +3 -3
- data/lib/puppet/provider/cron/crontab.rb +38 -36
- data/lib/puppet/provider/host/netinfo.rb +1 -2
- data/lib/puppet/provider/mailalias/aliases.rb +31 -0
- data/lib/puppet/provider/maillist/mailman.rb +113 -0
- data/lib/puppet/provider/mount.rb +5 -11
- data/lib/puppet/provider/mount/parsed.rb +2 -2
- data/lib/puppet/provider/package/appdmg.rb +1 -2
- data/lib/puppet/provider/package/apt.rb +3 -1
- data/lib/puppet/provider/package/aptrpm.rb +14 -4
- data/lib/puppet/provider/package/blastwave.rb +6 -4
- data/lib/puppet/provider/package/dpkg.rb +12 -4
- data/lib/puppet/provider/package/pkgdmg.rb +2 -2
- data/lib/puppet/provider/package/rpm.rb +11 -1
- data/lib/puppet/provider/package/rug.rb +1 -0
- data/lib/puppet/provider/package/urpmi.rb +11 -1
- data/lib/puppet/provider/package/yum.rb +12 -2
- data/lib/puppet/provider/parsedfile.rb +36 -6
- data/lib/puppet/rails.rb +9 -2
- data/lib/puppet/rails/param_name.rb +2 -3
- data/lib/puppet/rails/param_value.rb +20 -1
- data/lib/puppet/rails/resource.rb +8 -2
- data/lib/puppet/reference/configuration.rb +14 -16
- data/lib/puppet/reference/type.rb +4 -4
- data/lib/puppet/transaction.rb +4 -4
- data/lib/puppet/type.rb +19 -6
- data/lib/puppet/type/component.rb +9 -3
- data/lib/puppet/type/cron.rb +10 -4
- data/lib/puppet/type/exec.rb +9 -5
- data/lib/puppet/type/group.rb +2 -3
- data/lib/puppet/type/mailalias.rb +50 -0
- data/lib/puppet/type/maillist.rb +57 -0
- data/lib/puppet/type/mount.rb +25 -11
- data/lib/puppet/type/package.rb +6 -27
- data/lib/puppet/type/pfile.rb +5 -6
- data/lib/puppet/type/pfile/source.rb +8 -2
- data/lib/puppet/type/pfilebucket.rb +4 -3
- data/lib/puppet/type/resources.rb +1 -3
- data/lib/puppet/type/schedule.rb +16 -16
- data/lib/puppet/type/service.rb +4 -1
- data/lib/puppet/type/tidy.rb +1 -2
- data/lib/puppet/type/user.rb +2 -3
- data/lib/puppet/type/yumrepo.rb +2 -2
- data/lib/puppet/util.rb +29 -4
- data/lib/puppet/util/autoload.rb +45 -16
- data/lib/puppet/util/fileparsing.rb +23 -6
- data/lib/puppet/util/filetype.rb +12 -1
- data/lib/puppet/util/log.rb +2 -2
- data/lib/puppet/util/log_paths.rb +16 -0
- data/lib/puppet/util/reference.rb +2 -2
- data/test/language/ast/hostclass.rb +21 -4
- data/test/language/ast/resourceref.rb +95 -0
- data/test/language/functions.rb +5 -5
- data/test/language/interpreter.rb +129 -1
- data/test/language/node.rb +13 -2
- data/test/language/resource.rb +26 -1
- data/test/language/scope.rb +25 -5
- data/test/lib/puppettest/support/collection.rb +2 -2
- data/test/network/client/master.rb +28 -42
- data/test/network/server/mongrel_test.rb +7 -1
- data/test/other/propertychange.rb +2 -2
- data/test/other/transactions.rb +44 -5
- data/test/puppet/modules.rb +2 -1
- data/test/rails/ast.rb +7 -8
- data/test/rails/collection.rb +2 -2
- data/test/rails/railsresource.rb +21 -5
- data/test/ral/manager/attributes.rb +33 -1
- data/test/ral/manager/instances.rb +33 -6
- data/test/ral/manager/type.rb +29 -49
- data/test/ral/providers/cron/crontab.rb +61 -13
- data/test/ral/providers/mailalias/aliases.rb +57 -0
- data/test/ral/providers/mount/parsed.rb +4 -4
- data/test/ral/providers/package/apt.rb +13 -1
- data/test/ral/providers/parsedfile.rb +20 -7
- data/test/ral/types/cron.rb +17 -1
- data/test/ral/types/mailalias.rb +50 -0
- data/test/ral/types/mount.rb +35 -2
- data/test/ral/types/package.rb +10 -2
- data/test/ral/types/parameter.rb +4 -4
- data/test/ral/types/property.rb +39 -1
- data/test/util/autoload.rb +33 -18
- data/test/util/filetype.rb +49 -3
- metadata +13 -6
- data/lib/puppet/element.rb +0 -52
@@ -0,0 +1,57 @@
|
|
1
|
+
module Puppet
|
2
|
+
newtype(:maillist) do
|
3
|
+
@doc = "Manage email lists. This resource type currently can only create
|
4
|
+
and remove lists, it cannot reconfigure them."
|
5
|
+
|
6
|
+
ensurable do
|
7
|
+
defaultvalues
|
8
|
+
|
9
|
+
newvalue(:purged) do
|
10
|
+
provider.purge
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
newparam(:name, :namevar => true) do
|
15
|
+
desc "The name of the email list."
|
16
|
+
end
|
17
|
+
|
18
|
+
newparam(:description) do
|
19
|
+
desc "The description of the mailing list."
|
20
|
+
end
|
21
|
+
|
22
|
+
newparam(:password) do
|
23
|
+
desc "The admin password."
|
24
|
+
end
|
25
|
+
|
26
|
+
newparam(:webserver) do
|
27
|
+
desc "The name of the host providing web archives and the administrative interface."
|
28
|
+
end
|
29
|
+
|
30
|
+
newparam(:mailserver) do
|
31
|
+
desc "The name of the host handling email for the list."
|
32
|
+
end
|
33
|
+
|
34
|
+
newparam(:admin) do
|
35
|
+
desc "The email address of the administrator."
|
36
|
+
end
|
37
|
+
|
38
|
+
def generate
|
39
|
+
if provider.respond_to?(:aliases)
|
40
|
+
should = self.should(:ensure) || :present
|
41
|
+
if should == :purged
|
42
|
+
should = :absent
|
43
|
+
end
|
44
|
+
atype = Puppet::Type.type(:mailalias)
|
45
|
+
return provider.aliases.collect do |name, recipient|
|
46
|
+
if atype[name]
|
47
|
+
nil
|
48
|
+
else
|
49
|
+
malias = Puppet::Type.type(:mailalias).create(:name => name, :recipient => recipient, :ensure => should)
|
50
|
+
end
|
51
|
+
end.compact
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# $Id: maillist.rb 2677 2007-07-11 18:35:51Z luke $
|
data/lib/puppet/type/mount.rb
CHANGED
@@ -6,18 +6,20 @@ module Puppet
|
|
6
6
|
on the value of the 'ensure' parameter.
|
7
7
|
|
8
8
|
Note that if a ``mount`` receives an event from another resource,
|
9
|
-
it will try to remount the filesystems if ``ensure
|
10
|
-
|
9
|
+
it will try to remount the filesystems if ``ensure`` is set to ``mounted``."
|
10
|
+
|
11
|
+
feature :refreshable, "The provider can remount the filesystem.",
|
12
|
+
:methods => [:remount]
|
11
13
|
|
12
14
|
# Use the normal parent class, because we actually want to
|
13
15
|
# call code when sync() is called.
|
14
16
|
newproperty(:ensure) do
|
15
|
-
desc "Control what to do with this mount.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
desc "Control what to do with this mount. Set this attribute to
|
18
|
+
``present`` to make sure the filesystem is in the filesystem table
|
19
|
+
but not mounted (if the filesystem is currently mounted, it will be
|
20
|
+
unmounted). Set it to ``absent`` to unmount (if necessary) and remove
|
21
|
+
the filesystem from the fstab. Set to ``mounted`` to add it to the
|
22
|
+
fstab and mount it."
|
21
23
|
|
22
24
|
newvalue(:present) do
|
23
25
|
if provider.mounted?
|
@@ -47,11 +49,23 @@ module Puppet
|
|
47
49
|
end
|
48
50
|
|
49
51
|
syncothers()
|
50
|
-
|
52
|
+
# The fs can be already mounted if it was absent but mounted
|
53
|
+
unless provider.mounted?
|
54
|
+
provider.mount
|
55
|
+
end
|
51
56
|
end
|
52
57
|
|
53
58
|
def retrieve
|
54
|
-
|
59
|
+
# We need to special case :mounted; if we're absent, we still
|
60
|
+
# want
|
61
|
+
curval = super()
|
62
|
+
if curval == :absent
|
63
|
+
return curval
|
64
|
+
elsif provider.mounted?
|
65
|
+
return :mounted
|
66
|
+
else
|
67
|
+
return curval
|
68
|
+
end
|
55
69
|
end
|
56
70
|
|
57
71
|
def syncothers
|
@@ -199,4 +213,4 @@ module Puppet
|
|
199
213
|
end
|
200
214
|
end
|
201
215
|
|
202
|
-
# $Id: mount.rb
|
216
|
+
# $Id: mount.rb 2723 2007-07-20 16:46:54Z luke $
|
data/lib/puppet/type/package.rb
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
# This allows packages to exist on the same machine using different packaging
|
4
4
|
# systems.
|
5
5
|
|
6
|
-
require 'puppet/type/property'
|
7
|
-
|
8
6
|
module Puppet
|
9
7
|
class PackageError < Puppet::Error; end
|
10
8
|
newtype(:package) do
|
@@ -59,27 +57,14 @@ module Puppet
|
|
59
57
|
provider.uninstall
|
60
58
|
end
|
61
59
|
|
62
|
-
newvalue(:purged, :event => :package_purged) do
|
63
|
-
unless provider.purgeable?
|
64
|
-
self.fail(
|
65
|
-
"Package provider %s does not purging" %
|
66
|
-
@resource[:provider]
|
67
|
-
)
|
68
|
-
end
|
60
|
+
newvalue(:purged, :event => :package_purged, :required_features => :purgeable) do
|
69
61
|
provider.purge
|
70
62
|
end
|
71
63
|
|
72
64
|
# Alias the 'present' value.
|
73
65
|
aliasvalue(:installed, :present)
|
74
66
|
|
75
|
-
newvalue(:latest) do
|
76
|
-
unless provider.upgradeable?
|
77
|
-
self.fail(
|
78
|
-
"Package provider %s does not support specifying 'latest'" %
|
79
|
-
@resource[:provider]
|
80
|
-
)
|
81
|
-
end
|
82
|
-
|
67
|
+
newvalue(:latest, :required_features => :upgradeable) do
|
83
68
|
# Because yum always exits with a 0 exit code, there's a retrieve
|
84
69
|
# in the "install" method. So, check the current state now,
|
85
70
|
# to compare against later.
|
@@ -97,13 +82,7 @@ module Puppet
|
|
97
82
|
end
|
98
83
|
end
|
99
84
|
|
100
|
-
newvalue(
|
101
|
-
unless provider.class.versionable?
|
102
|
-
self.fail(
|
103
|
-
"Package provider %s does not support specifying versions" %
|
104
|
-
@resource[:provider]
|
105
|
-
)
|
106
|
-
end
|
85
|
+
newvalue(/./, :required_features => :versionable) do
|
107
86
|
begin
|
108
87
|
provider.install
|
109
88
|
rescue => detail
|
@@ -132,7 +111,7 @@ module Puppet
|
|
132
111
|
@should.each { |should|
|
133
112
|
case should
|
134
113
|
when :present
|
135
|
-
unless
|
114
|
+
unless [:absent, :purged].include?(is)
|
136
115
|
return true
|
137
116
|
end
|
138
117
|
when :latest
|
@@ -187,7 +166,7 @@ module Puppet
|
|
187
166
|
|
188
167
|
# This retrieves the current state. LAK: I think this method is unused.
|
189
168
|
def retrieve
|
190
|
-
return
|
169
|
+
return provider.properties[:ensure]
|
191
170
|
end
|
192
171
|
|
193
172
|
# Provide a bit more information when logging upgrades.
|
@@ -424,4 +403,4 @@ module Puppet
|
|
424
403
|
end # Puppet.type(:package)
|
425
404
|
end
|
426
405
|
|
427
|
-
# $Id: package.rb
|
406
|
+
# $Id: package.rb 2709 2007-07-19 00:14:15Z luke $
|
data/lib/puppet/type/pfile.rb
CHANGED
@@ -3,7 +3,6 @@ require 'cgi'
|
|
3
3
|
require 'etc'
|
4
4
|
require 'uri'
|
5
5
|
require 'fileutils'
|
6
|
-
require 'puppet/type/property'
|
7
6
|
require 'puppet/network/handler'
|
8
7
|
|
9
8
|
module Puppet
|
@@ -12,13 +11,13 @@ module Puppet
|
|
12
11
|
@doc = "Manages local files, including setting ownership and
|
13
12
|
permissions, creation of both files and directories, and
|
14
13
|
retrieving entire files from remote servers. As Puppet matures, it
|
15
|
-
expected that the ``file``
|
16
|
-
manage content, and instead native
|
14
|
+
expected that the ``file`` resource will be used less and less to
|
15
|
+
manage content, and instead native resources will be used to do so.
|
17
16
|
|
18
17
|
If you find that you are often copying files in from a central
|
19
|
-
location, rather than using native
|
18
|
+
location, rather than using native resources, please contact
|
20
19
|
Reductive Labs and we can hopefully work with you to develop a
|
21
|
-
native
|
20
|
+
native resource to support what you are doing."
|
22
21
|
|
23
22
|
newparam(:path) do
|
24
23
|
desc "The path to the file to manage. Must be fully qualified."
|
@@ -1179,4 +1178,4 @@ module Puppet
|
|
1179
1178
|
require 'puppet/type/pfile/mode'
|
1180
1179
|
require 'puppet/type/pfile/type'
|
1181
1180
|
end
|
1182
|
-
# $Id: pfile.rb
|
1181
|
+
# $Id: pfile.rb 2665 2007-07-09 21:32:33Z luke $
|
@@ -23,6 +23,11 @@ module Puppet
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
|
26
|
+
You can also leave out the server name, in which case ``puppetd``
|
27
|
+
will fill in the name of its configuration server and ``puppet``
|
28
|
+
will use the local filesystem. This makes it easy to use the same
|
29
|
+
configuration in both local and centralized forms.
|
30
|
+
|
26
31
|
Currently, only the ``puppet`` scheme is supported for source
|
27
32
|
URL's. Puppet will connect to the file server running on
|
28
33
|
``server`` to retrieve the contents of the file. If the
|
@@ -50,7 +55,8 @@ module Puppet
|
|
50
55
|
This will use the first found file as the source.
|
51
56
|
|
52
57
|
You cannot currently copy links using this mechanism; set ``links``
|
53
|
-
to ``follow`` if any remote sources are links.
|
58
|
+
to ``follow`` if any remote sources are links.
|
59
|
+
"
|
54
60
|
|
55
61
|
uncheckable
|
56
62
|
|
@@ -271,4 +277,4 @@ module Puppet
|
|
271
277
|
end
|
272
278
|
end
|
273
279
|
|
274
|
-
# $Id: source.rb
|
280
|
+
# $Id: source.rb 2699 2007-07-14 23:04:19Z luke $
|
@@ -65,9 +65,10 @@ module Puppet
|
|
65
65
|
|
66
66
|
# Create a default filebucket.
|
67
67
|
def self.mkdefaultbucket
|
68
|
-
unless self["puppet"]
|
69
|
-
self.create :name => "puppet", :path => Puppet[:clientbucketdir]
|
68
|
+
unless default = self["puppet"]
|
69
|
+
default = self.create :name => "puppet", :path => Puppet[:clientbucketdir]
|
70
70
|
end
|
71
|
+
default
|
71
72
|
end
|
72
73
|
|
73
74
|
def self.instances
|
@@ -114,4 +115,4 @@ module Puppet
|
|
114
115
|
end
|
115
116
|
end
|
116
117
|
|
117
|
-
# $Id: pfilebucket.rb
|
118
|
+
# $Id: pfilebucket.rb 2679 2007-07-11 20:23:49Z luke $
|
@@ -137,8 +137,6 @@ Puppet::Type.newtype(:resources) do
|
|
137
137
|
return false
|
138
138
|
end
|
139
139
|
|
140
|
-
resource.info current_values.inspect
|
141
|
-
|
142
140
|
if current_values[resource.property(:uid)] <= self[:unless_system_user]
|
143
141
|
return false
|
144
142
|
else
|
@@ -151,4 +149,4 @@ Puppet::Type.newtype(:resources) do
|
|
151
149
|
end
|
152
150
|
end
|
153
151
|
|
154
|
-
# $Id: resources.rb
|
152
|
+
# $Id: resources.rb 2687 2007-07-12 19:51:57Z luke $
|
data/lib/puppet/type/schedule.rb
CHANGED
@@ -2,20 +2,20 @@ module Puppet
|
|
2
2
|
newtype(:schedule) do
|
3
3
|
@doc = "Defined schedules for Puppet. The important thing to understand
|
4
4
|
about how schedules are currently implemented in Puppet is that they
|
5
|
-
can only be used to stop
|
5
|
+
can only be used to stop a resource from being applied, they never
|
6
6
|
guarantee that it is applied.
|
7
7
|
|
8
8
|
Every time Puppet applies its configuration, it will collect the
|
9
|
-
list of
|
9
|
+
list of resources whose schedule does not eliminate them from
|
10
10
|
running right then, but there is currently no system in place to
|
11
|
-
guarantee that a given
|
11
|
+
guarantee that a given resource runs at a given time. If you
|
12
12
|
specify a very restrictive schedule and Puppet happens to run at a
|
13
|
-
time within that schedule, then the
|
13
|
+
time within that schedule, then the resources will get applied;
|
14
14
|
otherwise, that work may never get done.
|
15
15
|
|
16
16
|
Thus, it behooves you to use wider scheduling (e.g., over a couple of
|
17
17
|
hours) combined with periods and repetitions. For instance, if you
|
18
|
-
wanted to restrict certain
|
18
|
+
wanted to restrict certain resources to only running once, between
|
19
19
|
the hours of two and 4 AM, then you would use this schedule::
|
20
20
|
|
21
21
|
schedule { maint:
|
@@ -25,7 +25,7 @@ module Puppet
|
|
25
25
|
}
|
26
26
|
|
27
27
|
With this schedule, the first time that Puppet runs between 2 and 4 AM,
|
28
|
-
all
|
28
|
+
all resources with this schedule will get applied, but they won't
|
29
29
|
get applied again between 2 and 4 because they will have already
|
30
30
|
run once that day, and they won't get applied outside that schedule
|
31
31
|
because they will be outside the scheduled range.
|
@@ -40,7 +40,7 @@ module Puppet
|
|
40
40
|
repeat => 2
|
41
41
|
}
|
42
42
|
|
43
|
-
This will cause
|
43
|
+
This will cause resources to be applied every 30 minutes by default.
|
44
44
|
"
|
45
45
|
|
46
46
|
newparam(:name) do
|
@@ -61,7 +61,7 @@ module Puppet
|
|
61
61
|
end
|
62
62
|
|
63
63
|
newparam(:range) do
|
64
|
-
desc "The earliest and latest that
|
64
|
+
desc "The earliest and latest that a resource can be applied. This
|
65
65
|
is always a range within a 24 hour period, and hours must be
|
66
66
|
specified in numbers between 0 and 23, inclusive. Minutes and
|
67
67
|
seconds can be provided, using the normal colon as a separator.
|
@@ -71,7 +71,7 @@ module Puppet
|
|
71
71
|
range => \"1:30 - 4:30\"
|
72
72
|
}
|
73
73
|
|
74
|
-
This is mostly useful for restricting certain
|
74
|
+
This is mostly useful for restricting certain resources to being
|
75
75
|
applied in maintenance windows or during off-peak hours."
|
76
76
|
|
77
77
|
# This is lame; properties all use arrays as values, but parameters don't.
|
@@ -197,19 +197,19 @@ module Puppet
|
|
197
197
|
end
|
198
198
|
|
199
199
|
newparam(:period) do
|
200
|
-
desc "The period of repetition for
|
200
|
+
desc "The period of repetition for a resource. Choose from among
|
201
201
|
a fixed list of *hourly*, *daily*, *weekly*, and *monthly*.
|
202
|
-
The default is for
|
202
|
+
The default is for a resource to get applied every time that
|
203
203
|
Puppet runs, whatever that period is.
|
204
204
|
|
205
|
-
Note that the period defines how often a given
|
205
|
+
Note that the period defines how often a given resource will get
|
206
206
|
applied but not when; if you would like to restrict the hours
|
207
|
-
that a given
|
207
|
+
that a given resource can be applied (e.g., only at night during
|
208
208
|
a maintenance window) then use the ``range`` attribute.
|
209
209
|
|
210
210
|
If the provided periods are not sufficient, you can provide a
|
211
211
|
value to the *repeat* attribute, which will cause Puppet to
|
212
|
-
schedule the affected
|
212
|
+
schedule the affected resources evenly in the period the
|
213
213
|
specified number of times. Take this schedule::
|
214
214
|
|
215
215
|
schedule { veryoften:
|
@@ -217,7 +217,7 @@ module Puppet
|
|
217
217
|
repeat => 6
|
218
218
|
}
|
219
219
|
|
220
|
-
This can cause Puppet to apply that
|
220
|
+
This can cause Puppet to apply that resource up to every 10 minutes.
|
221
221
|
|
222
222
|
At the moment, Puppet cannot guarantee that level of
|
223
223
|
repetition; that is, it can run up to every 10 minutes, but
|
@@ -358,4 +358,4 @@ module Puppet
|
|
358
358
|
end
|
359
359
|
end
|
360
360
|
|
361
|
-
# $Id: schedule.rb
|
361
|
+
# $Id: schedule.rb 2665 2007-07-09 21:32:33Z luke $
|
data/lib/puppet/type/service.rb
CHANGED
@@ -22,6 +22,9 @@ module Puppet
|
|
22
22
|
service depends on the platform. You can provide a special command
|
23
23
|
for restarting with the ``restart`` attribute."
|
24
24
|
|
25
|
+
feature :refreshable, "The provider can restart the service.",
|
26
|
+
:methods => [:restart]
|
27
|
+
|
25
28
|
feature :enableable, "The provider can enable and disable the service",
|
26
29
|
:methods => [:disable, :enable, :enabled?]
|
27
30
|
|
@@ -313,4 +316,4 @@ module Puppet
|
|
313
316
|
end
|
314
317
|
end
|
315
318
|
|
316
|
-
# $Id: service.rb
|
319
|
+
# $Id: service.rb 2696 2007-07-14 20:26:31Z luke $
|
data/lib/puppet/type/tidy.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
|
2
2
|
require 'etc'
|
3
|
-
require 'puppet/type/property'
|
4
3
|
require 'puppet/type/pfile'
|
5
4
|
|
6
5
|
module Puppet
|
@@ -293,4 +292,4 @@ module Puppet
|
|
293
292
|
end
|
294
293
|
end
|
295
294
|
|
296
|
-
# $Id: tidy.rb
|
295
|
+
# $Id: tidy.rb 2647 2007-07-04 22:25:23Z luke $
|
data/lib/puppet/type/user.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'etc'
|
2
2
|
require 'facter'
|
3
|
-
require 'puppet/type/property'
|
4
3
|
|
5
4
|
module Puppet
|
6
5
|
newtype(:user) do
|
@@ -8,7 +7,7 @@ module Puppet
|
|
8
7
|
users, so it is lacking some features useful for managing normal
|
9
8
|
users.
|
10
9
|
|
11
|
-
This
|
10
|
+
This resource type uses the prescribed native tools for creating
|
12
11
|
groups and generally uses POSIX APIs for retrieving information
|
13
12
|
about them. It does not directly modify /etc/passwd or anything."
|
14
13
|
|
@@ -344,4 +343,4 @@ module Puppet
|
|
344
343
|
end
|
345
344
|
end
|
346
345
|
|
347
|
-
# $Id: user.rb
|
346
|
+
# $Id: user.rb 2665 2007-07-09 21:32:33Z luke $
|
data/lib/puppet/type/yumrepo.rb
CHANGED
@@ -188,7 +188,7 @@ module Puppet
|
|
188
188
|
super
|
189
189
|
end
|
190
190
|
|
191
|
-
# Return the Puppet::Util::IniConfig::Section for this yumrepo
|
191
|
+
# Return the Puppet::Util::IniConfig::Section for this yumrepo resource
|
192
192
|
def section
|
193
193
|
self.class.section(self[:name])
|
194
194
|
end
|
@@ -217,7 +217,7 @@ module Puppet
|
|
217
217
|
return changes
|
218
218
|
end
|
219
219
|
|
220
|
-
# Store modifications to this yumrepo
|
220
|
+
# Store modifications to this yumrepo resource back to disk
|
221
221
|
def store
|
222
222
|
self.class.store
|
223
223
|
end
|