puppet 2.6.0 → 2.6.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 +123 -0
- data/conf/redhat/puppet.spec +8 -2
- data/conf/solaris/smf/svc-puppetd +1 -1
- data/conf/solaris/smf/svc-puppetmasterd +1 -1
- data/conf/suse/client.init +4 -4
- data/conf/suse/fileserver.conf +12 -0
- data/conf/suse/logrotate +10 -0
- data/conf/suse/puppet.conf +25 -0
- data/conf/suse/puppet.spec +114 -49
- data/conf/suse/ruby-env.patch +17 -0
- data/conf/suse/server.init +4 -4
- data/ext/logcheck/puppet +23 -23
- data/ext/puppet-load.rb +357 -0
- data/ext/puppetstoredconfigclean.rb +3 -3
- data/ext/rack/files/config.ru +3 -5
- data/ext/vim/syntax/puppet.vim +6 -5
- data/install.rb +12 -11
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +3 -1
- data/lib/puppet/application.rb +2 -3
- data/lib/puppet/application/agent.rb +4 -0
- data/lib/puppet/application/apply.rb +14 -6
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/doc.rb +2 -36
- data/lib/puppet/application/master.rb +0 -3
- data/lib/puppet/application/queue.rb +1 -0
- data/lib/puppet/configurer.rb +4 -0
- data/lib/puppet/daemon.rb +1 -1
- data/lib/puppet/defaults.rb +38 -44
- data/lib/puppet/file_serving/indirection_hooks.rb +2 -2
- data/lib/puppet/indirector/facts/memory.rb +1 -1
- data/lib/puppet/indirector/node/exec.rb +1 -1
- data/lib/puppet/indirector/node/ldap.rb +9 -53
- data/lib/puppet/indirector/node/memory.rb +1 -1
- data/lib/puppet/indirector/yaml.rb +6 -9
- data/lib/puppet/network/format_handler.rb +6 -0
- data/lib/puppet/network/formats.rb +4 -4
- data/lib/puppet/network/http/handler.rb +1 -1
- data/lib/puppet/network/http/rack.rb +3 -0
- data/lib/puppet/network/http/rack/rest.rb +1 -1
- data/lib/puppet/network/rest_authconfig.rb +6 -3
- data/lib/puppet/node/environment.rb +15 -5
- data/lib/puppet/parameter/value_collection.rb +3 -3
- data/lib/puppet/parser/ast/function.rb +0 -1
- data/lib/puppet/parser/ast/leaf.rb +1 -1
- data/lib/puppet/parser/ast/resource.rb +4 -3
- data/lib/puppet/parser/ast/resource_reference.rb +9 -2
- data/lib/puppet/parser/compiler.rb +12 -14
- data/lib/puppet/parser/files.rb +1 -1
- data/lib/puppet/parser/functions.rb +2 -2
- data/lib/puppet/parser/functions/defined.rb +1 -1
- data/lib/puppet/parser/functions/extlookup.rb +157 -0
- data/lib/puppet/parser/functions/file.rb +1 -1
- data/lib/puppet/parser/functions/inline_template.rb +6 -5
- data/lib/puppet/parser/functions/md5.rb +5 -0
- data/lib/puppet/parser/functions/realize.rb +1 -1
- data/lib/puppet/parser/functions/regsubst.rb +19 -19
- data/lib/puppet/parser/functions/require.rb +2 -3
- data/lib/puppet/parser/functions/split.rb +1 -1
- data/lib/puppet/parser/functions/sprintf.rb +1 -1
- data/lib/puppet/parser/functions/template.rb +4 -2
- data/lib/puppet/parser/functions/versioncmp.rb +12 -12
- data/lib/puppet/parser/lexer.rb +13 -14
- data/lib/puppet/parser/resource.rb +2 -7
- data/lib/puppet/parser/resource/param.rb +1 -1
- data/lib/puppet/parser/scope.rb +35 -0
- data/lib/puppet/parser/type_loader.rb +1 -1
- data/lib/puppet/property.rb +5 -5
- data/lib/puppet/provider.rb +3 -3
- data/lib/puppet/provider/group/groupadd.rb +1 -1
- data/lib/puppet/provider/group/ldap.rb +3 -3
- data/lib/puppet/provider/group/pw.rb +1 -1
- data/lib/puppet/provider/package/apple.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +5 -1
- data/lib/puppet/provider/package/aptitude.rb +1 -1
- data/lib/puppet/provider/package/aptrpm.rb +1 -1
- data/lib/puppet/provider/package/blastwave.rb +1 -1
- data/lib/puppet/provider/package/dpkg.rb +2 -2
- data/lib/puppet/provider/package/fink.rb +1 -1
- data/lib/puppet/provider/package/gem.rb +1 -1
- data/lib/puppet/provider/package/openbsd.rb +1 -1
- data/lib/puppet/provider/package/rpm.rb +1 -1
- data/lib/puppet/provider/package/rug.rb +1 -1
- data/lib/puppet/provider/package/sunfreeware.rb +2 -2
- data/lib/puppet/provider/package/up2date.rb +1 -1
- data/lib/puppet/provider/package/urpmi.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/package/zypper.rb +1 -1
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/bsd.rb +2 -2
- data/lib/puppet/provider/service/debian.rb +2 -2
- data/lib/puppet/provider/service/gentoo.rb +2 -2
- data/lib/puppet/provider/service/init.rb +2 -2
- data/lib/puppet/provider/service/redhat.rb +2 -2
- data/lib/puppet/provider/user/ldap.rb +3 -3
- data/lib/puppet/provider/user/pw.rb +1 -1
- data/lib/puppet/provider/user/user_role_add.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/rails/host.rb +1 -0
- data/lib/puppet/reference/configuration.rb +37 -34
- data/lib/puppet/reference/indirection.rb +3 -4
- data/lib/puppet/reference/metaparameter.rb +0 -8
- data/lib/puppet/reference/network.rb +6 -4
- data/lib/puppet/reference/providers.rb +4 -4
- data/lib/puppet/reference/report.rb +5 -6
- data/lib/puppet/reference/type.rb +14 -14
- data/lib/puppet/reports/http.rb +1 -1
- data/lib/puppet/reports/rrdgraph.rb +8 -9
- data/lib/puppet/reports/store.rb +2 -2
- data/lib/puppet/reports/tagmail.rb +12 -13
- data/lib/puppet/resource.rb +15 -115
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/resource/type.rb +26 -3
- data/lib/puppet/resource/type_collection.rb +3 -6
- data/lib/puppet/simple_graph.rb +4 -5
- data/lib/puppet/transaction/resource_harness.rb +1 -1
- data/lib/puppet/type.rb +100 -92
- data/lib/puppet/type/augeas.rb +44 -45
- data/lib/puppet/type/computer.rb +2 -2
- data/lib/puppet/type/cron.rb +29 -29
- data/lib/puppet/type/exec.rb +66 -67
- data/lib/puppet/type/file.rb +25 -25
- data/lib/puppet/type/file/content.rb +7 -1
- data/lib/puppet/type/file/ensure.rb +13 -13
- data/lib/puppet/type/file/mode.rb +6 -6
- data/lib/puppet/type/file/selcontext.rb +5 -5
- data/lib/puppet/type/file/source.rb +36 -26
- data/lib/puppet/type/filebucket.rb +5 -6
- data/lib/puppet/type/group.rb +1 -2
- data/lib/puppet/type/host.rb +3 -6
- data/lib/puppet/type/k5login.rb +3 -3
- data/lib/puppet/type/macauthorization.rb +1 -2
- data/lib/puppet/type/mailalias.rb +0 -1
- data/lib/puppet/type/maillist.rb +0 -1
- data/lib/puppet/type/mcx.rb +9 -9
- data/lib/puppet/type/mount.rb +9 -10
- data/lib/puppet/type/notify.rb +0 -1
- data/lib/puppet/type/package.rb +34 -36
- data/lib/puppet/type/resources.rb +1 -5
- data/lib/puppet/type/schedule.rb +9 -12
- data/lib/puppet/type/selboolean.rb +2 -7
- data/lib/puppet/type/selmodule.rb +3 -4
- data/lib/puppet/type/service.rb +9 -9
- data/lib/puppet/type/ssh_authorized_key.rb +2 -3
- data/lib/puppet/type/sshkey.rb +4 -7
- data/lib/puppet/type/stage.rb +5 -4
- data/lib/puppet/type/tidy.rb +3 -3
- data/lib/puppet/type/user.rb +1 -2
- data/lib/puppet/type/whit.rb +7 -0
- data/lib/puppet/type/yumrepo.rb +16 -3
- data/lib/puppet/type/zfs.rb +1 -2
- data/lib/puppet/type/zone.rb +28 -28
- data/lib/puppet/type/zpool.rb +10 -5
- data/lib/puppet/util/autoload.rb +17 -5
- data/lib/puppet/util/cacher.rb +15 -10
- data/lib/puppet/util/command_line/puppetdoc +5 -5
- data/lib/puppet/util/command_line/puppetrun +0 -2
- data/lib/puppet/util/command_line/ralsh +13 -13
- data/lib/puppet/util/docs.rb +5 -12
- data/lib/puppet/util/monkey_patches.rb +5 -2
- data/lib/puppet/util/nagios_maker.rb +4 -5
- data/lib/puppet/util/provider_features.rb +2 -2
- data/lib/puppet/util/rdoc.rb +1 -1
- data/lib/puppet/util/rdoc/parser.rb +5 -3
- data/lib/puppet/util/reference.rb +3 -52
- data/man/man5/puppet.conf.5 +2072 -1526
- data/man/man8/filebucket.8 +104 -106
- data/man/man8/pi.8 +14 -47
- data/man/man8/puppet.8 +8 -9
- data/man/man8/puppetca.8 +168 -129
- data/man/man8/puppetd.8 +282 -226
- data/man/man8/puppetdoc.8 +103 -103
- data/man/man8/puppetmasterd.8 +51 -71
- data/man/man8/puppetqd.8 +18 -53
- data/man/man8/puppetrun.8 +163 -143
- data/man/man8/ralsh.8 +77 -114
- data/spec/integration/indirector/bucket_file/rest_spec.rb +1 -0
- data/spec/integration/indirector/certificate/rest_spec.rb +1 -0
- data/spec/integration/indirector/certificate_request/rest_spec.rb +1 -0
- data/spec/integration/indirector/certificate_revocation_list/rest_spec.rb +1 -0
- data/spec/integration/indirector/report/rest_spec.rb +1 -0
- data/spec/integration/indirector/rest_spec.rb +1 -0
- data/spec/integration/network/server/webrick_spec.rb +1 -0
- data/spec/integration/parser/compiler_spec.rb +43 -0
- data/spec/integration/provider/mailalias/aliases_spec.rb +5 -5
- data/spec/integration/ssl/certificate_authority_spec.rb +1 -0
- data/spec/integration/ssl/certificate_request_spec.rb +1 -0
- data/spec/integration/ssl/certificate_revocation_list_spec.rb +1 -0
- data/spec/integration/ssl/host_spec.rb +1 -0
- data/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb +0 -1
- data/spec/monkey_patches/publicize_methods.rb +11 -0
- data/spec/shared_behaviours/file_serving.rb +12 -1
- data/spec/spec_helper.rb +6 -25
- data/spec/unit/application/apply_spec.rb +22 -4
- data/spec/unit/application/cert_spec.rb +1 -1
- data/spec/unit/application/doc_spec.rb +0 -19
- data/spec/unit/application/master_spec.rb +1 -1
- data/spec/unit/application_spec.rb +2 -12
- data/spec/unit/indirector/node/ldap_spec.rb +19 -21
- data/spec/unit/indirector/yaml_spec.rb +18 -6
- data/spec/unit/network/http/rack/rest_spec.rb +3 -3
- data/spec/unit/network/http/webrick/rest_spec.rb +1 -0
- data/spec/unit/node/environment_spec.rb +32 -3
- data/spec/unit/node/facts_spec.rb +13 -2
- data/spec/unit/parameter/value_collection_spec.rb +2 -2
- data/spec/unit/parser/ast/leaf_spec.rb +4 -0
- data/spec/unit/parser/ast/resource_reference_spec.rb +0 -5
- data/spec/unit/parser/ast/resource_spec.rb +7 -0
- data/spec/unit/parser/compiler_spec.rb +12 -1
- data/spec/unit/parser/files_spec.rb +3 -3
- data/spec/unit/parser/functions/extlookup_spec.rb +95 -0
- data/spec/unit/parser/functions/include_spec.rb +33 -0
- data/spec/unit/parser/functions/require_spec.rb +1 -1
- data/spec/unit/parser/functions/tag_spec.rb +1 -0
- data/spec/unit/parser/lexer_spec.rb +10 -1
- data/spec/unit/parser/resource_spec.rb +3 -9
- data/spec/unit/parser/type_loader_spec.rb +1 -1
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +4 -2
- data/spec/unit/rails/resource_spec.rb +1 -1
- data/spec/unit/reports/tagmail_spec.rb +2 -2
- data/spec/unit/resource/catalog_spec.rb +1 -1
- data/spec/unit/resource/type_collection_spec.rb +35 -0
- data/spec/unit/resource/type_spec.rb +19 -1
- data/spec/unit/resource_spec.rb +0 -36
- data/spec/unit/simple_graph_spec.rb +12 -2
- data/spec/unit/transaction/resource_harness_spec.rb +1 -1
- data/spec/unit/type/file/content_spec.rb +2 -1
- data/spec/unit/type/schedule_spec.rb +1 -1
- data/spec/unit/type/service_spec.rb +8 -0
- data/spec/unit/type/user_spec.rb +5 -0
- data/spec/unit/util/backups_spec.rb +0 -1
- data/spec/unit/util/rdoc/parser_spec.rb +3 -3
- data/spec/unit/util/rdoc_spec.rb +13 -0
- data/test/certmgr/support.rb +2 -1
- data/test/language/parser.rb +6 -6
- data/test/lib/puppettest.rb +3 -23
- data/test/lib/puppettest/fakes.rb +1 -1
- data/test/lib/puppettest/support/assertions.rb +0 -2
- data/test/lib/puppettest/support/utils.rb +25 -20
- data/test/ral/manager/attributes.rb +4 -1
- metadata +15 -9
- data/conf/suse/puppet.suse.patch +0 -16
- data/ext/extlookup.rb +0 -181
- data/ext/puppetlast +0 -16
- data/tasks/rake/tracdocs.rake +0 -8
- data/test/lib/mocha_standalone.rb +0 -2
@@ -1,12 +1,9 @@
|
|
1
|
-
# Created by Luke Kanies on 2006-12-12.
|
2
|
-
# Copyright (c) 2006. All rights reserved.
|
3
|
-
|
4
1
|
require 'puppet'
|
5
2
|
|
6
3
|
Puppet::Type.newtype(:resources) do
|
7
4
|
@doc = "This is a metatype that can manage other resource types. Any
|
8
5
|
metaparams specified here will be passed on to any generated resources,
|
9
|
-
so you can purge umanaged resources but set
|
6
|
+
so you can purge umanaged resources but set `noop` to true so the
|
10
7
|
purging is only logged and does not actually happen."
|
11
8
|
|
12
9
|
|
@@ -132,4 +129,3 @@ Puppet::Type.newtype(:resources) do
|
|
132
129
|
%w{root nobody bin noaccess daemon sys}
|
133
130
|
end
|
134
131
|
end
|
135
|
-
|
data/lib/puppet/type/schedule.rb
CHANGED
@@ -196,17 +196,17 @@ module Puppet
|
|
196
196
|
Note that the period defines how often a given resource will get
|
197
197
|
applied but not when; if you would like to restrict the hours
|
198
198
|
that a given resource can be applied (e.g., only at night during
|
199
|
-
a maintenance window) then use the
|
199
|
+
a maintenance window) then use the `range` attribute.
|
200
200
|
|
201
201
|
If the provided periods are not sufficient, you can provide a
|
202
202
|
value to the *repeat* attribute, which will cause Puppet to
|
203
203
|
schedule the affected resources evenly in the period the
|
204
|
-
specified number of times. Take this schedule
|
204
|
+
specified number of times. Take this schedule:
|
205
205
|
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
206
|
+
schedule { veryoften:
|
207
|
+
period => hourly,
|
208
|
+
repeat => 6
|
209
|
+
}
|
210
210
|
|
211
211
|
This can cause Puppet to apply that resource up to every 10 minutes.
|
212
212
|
|
@@ -215,7 +215,7 @@ module Puppet
|
|
215
215
|
internal factors might prevent it from actually running that
|
216
216
|
often (e.g., long-running Puppet runs will squash conflictingly scheduled runs).
|
217
217
|
|
218
|
-
See the
|
218
|
+
See the `periodmatch` attribute for tuning whether to match
|
219
219
|
times by their distance apart or by their specific value."
|
220
220
|
|
221
221
|
newvalues(:hourly, :daily, :weekly, :monthly, :never)
|
@@ -307,10 +307,10 @@ module Puppet
|
|
307
307
|
Puppet.debug "Creating default schedules"
|
308
308
|
|
309
309
|
result << self.new(
|
310
|
-
|
310
|
+
|
311
311
|
:name => "puppet",
|
312
312
|
:period => :hourly,
|
313
|
-
|
313
|
+
|
314
314
|
:repeat => "2"
|
315
315
|
)
|
316
316
|
|
@@ -318,9 +318,7 @@ module Puppet
|
|
318
318
|
@parameters.find { |p| p.name == :period }.value_collection.values.each { |value|
|
319
319
|
|
320
320
|
result << self.new(
|
321
|
-
|
322
321
|
:name => value.to_s,
|
323
|
-
|
324
322
|
:period => value
|
325
323
|
)
|
326
324
|
}
|
@@ -349,4 +347,3 @@ module Puppet
|
|
349
347
|
end
|
350
348
|
end
|
351
349
|
end
|
352
|
-
|
@@ -1,11 +1,7 @@
|
|
1
|
-
#
|
2
|
-
# Simple module for manageing SELinux booleans
|
3
|
-
#
|
4
|
-
|
5
1
|
module Puppet
|
6
2
|
newtype(:selboolean) do
|
7
3
|
@doc = "Manages SELinux booleans on systems with SELinux support. The supported booleans
|
8
|
-
are any of the ones found in
|
4
|
+
are any of the ones found in `/selinux/booleans/`."
|
9
5
|
|
10
6
|
newparam(:name) do
|
11
7
|
desc "The name of the SELinux boolean to be managed."
|
@@ -20,7 +16,7 @@ module Puppet
|
|
20
16
|
|
21
17
|
newparam(:persistent) do
|
22
18
|
desc "If set true, SELinux booleans will be written to disk and persist accross reboots.
|
23
|
-
The default is
|
19
|
+
The default is `false`."
|
24
20
|
|
25
21
|
defaultto :false
|
26
22
|
newvalues(:true, :false)
|
@@ -28,4 +24,3 @@ module Puppet
|
|
28
24
|
|
29
25
|
end
|
30
26
|
end
|
31
|
-
|
@@ -18,7 +18,7 @@ Puppet::Type.newtype(:selmodule) do
|
|
18
18
|
newparam(:selmoduledir) do
|
19
19
|
|
20
20
|
desc "The directory to look for the compiled pp module file in.
|
21
|
-
Currently defaults to
|
21
|
+
Currently defaults to `/usr/share/selinux/targeted`. If selmodulepath
|
22
22
|
is not specified the module will be looked for in this directory in a
|
23
23
|
in a file called NAME.pp, where NAME is the value of the name parameter."
|
24
24
|
|
@@ -34,9 +34,9 @@ Puppet::Type.newtype(:selmodule) do
|
|
34
34
|
|
35
35
|
newproperty(:syncversion) do
|
36
36
|
|
37
|
-
desc "If set to
|
37
|
+
desc "If set to `true`, the policy will be reloaded if the
|
38
38
|
version found in the on-disk file differs from the loaded
|
39
|
-
version. If set to
|
39
|
+
version. If set to `false` (the default) the the only check
|
40
40
|
that will be made is if the policy is loaded at all or not."
|
41
41
|
|
42
42
|
newvalue(:true)
|
@@ -51,4 +51,3 @@ Puppet::Type.newtype(:selmodule) do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
54
|
-
|
data/lib/puppet/type/service.rb
CHANGED
@@ -17,10 +17,10 @@ module Puppet
|
|
17
17
|
can provide the better behaviour you will get. Or, you can just
|
18
18
|
use a platform that has very good service support.
|
19
19
|
|
20
|
-
Note that if a
|
20
|
+
Note that if a `service` receives an event from another resource,
|
21
21
|
the service will get restarted. The actual command to restart the
|
22
22
|
service depends on the platform. You can provide a special command
|
23
|
-
for restarting with the
|
23
|
+
for restarting with the `restart` attribute."
|
24
24
|
|
25
25
|
feature :refreshable, "The provider can restart the service.",
|
26
26
|
:methods => [:restart]
|
@@ -83,7 +83,7 @@ module Puppet
|
|
83
83
|
newparam(:binary) do
|
84
84
|
desc "The path to the daemon. This is only used for
|
85
85
|
systems that do not support init scripts. This binary will be
|
86
|
-
used to start the service if no
|
86
|
+
used to start the service if no `start` parameter is
|
87
87
|
provided."
|
88
88
|
end
|
89
89
|
|
@@ -94,7 +94,7 @@ module Puppet
|
|
94
94
|
not support any kind of status command; thus, you must specify
|
95
95
|
manually whether the service you are running has such a
|
96
96
|
command (or you can specify a specific command using the
|
97
|
-
|
97
|
+
`status` parameter).
|
98
98
|
|
99
99
|
If you do not specify anything, then the service name will be
|
100
100
|
looked for in the process table."
|
@@ -140,7 +140,7 @@ module Puppet
|
|
140
140
|
end
|
141
141
|
newparam(:start) do
|
142
142
|
desc "Specify a *start* command manually. Most service subsystems
|
143
|
-
support a
|
143
|
+
support a `start` command, so this will not need to be
|
144
144
|
specified."
|
145
145
|
end
|
146
146
|
newparam(:status) do
|
@@ -156,14 +156,14 @@ module Puppet
|
|
156
156
|
|
157
157
|
newparam(:control) do
|
158
158
|
desc "The control variable used to manage services (originally for HP-UX).
|
159
|
-
Defaults to the upcased service name plus
|
160
|
-
underscores, for those providers that support the
|
159
|
+
Defaults to the upcased service name plus `START` replacing dots with
|
160
|
+
underscores, for those providers that support the `controllable` feature."
|
161
161
|
defaultto { resource.name.gsub(".","_").upcase + "_START" if resource.provider.controllable? }
|
162
162
|
end
|
163
163
|
|
164
164
|
newparam :hasrestart do
|
165
|
-
desc "Specify that an init script has a
|
166
|
-
the init script's
|
165
|
+
desc "Specify that an init script has a `restart` option. Otherwise,
|
166
|
+
the init script's `stop` and `start` methods are used."
|
167
167
|
newvalues(:true, :false)
|
168
168
|
end
|
169
169
|
|
@@ -34,8 +34,8 @@ module Puppet
|
|
34
34
|
newproperty(:target) do
|
35
35
|
desc "The absolute filename in which to store the SSH key. This
|
36
36
|
property is optional and should only be used in cases where keys
|
37
|
-
are stored in a non-standard location (
|
38
|
-
|
37
|
+
are stored in a non-standard location (i.e.` not in
|
38
|
+
`~user/.ssh/authorized_keys`)."
|
39
39
|
|
40
40
|
defaultto :absent
|
41
41
|
|
@@ -96,4 +96,3 @@ module Puppet
|
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
99
|
-
|
data/lib/puppet/type/sshkey.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module Puppet
|
2
2
|
newtype(:sshkey) do
|
3
3
|
@doc = "Installs and manages ssh host keys. At this point, this type
|
4
|
-
only knows how to install keys into
|
5
|
-
|
4
|
+
only knows how to install keys into `/etc/ssh/ssh_known_hosts`. See
|
5
|
+
the `ssh_authorized_key` type to manage authorized keys."
|
6
6
|
|
7
7
|
ensurable
|
8
8
|
|
@@ -23,9 +23,7 @@ module Puppet
|
|
23
23
|
# to see if we can automatically glean any aliases.
|
24
24
|
newproperty(:host_aliases) do
|
25
25
|
desc 'Any aliases the host might have. Multiple values must be
|
26
|
-
specified as an array.
|
27
|
-
the "alias" metaparam; use this property to add aliases to a host
|
28
|
-
on disk, and "alias" to aliases for use in your Puppet scripts.'
|
26
|
+
specified as an array.'
|
29
27
|
|
30
28
|
attr_accessor :meta
|
31
29
|
|
@@ -56,7 +54,7 @@ module Puppet
|
|
56
54
|
|
57
55
|
newproperty(:target) do
|
58
56
|
desc "The file in which to store the ssh key. Only used by
|
59
|
-
the
|
57
|
+
the `parsed` provider."
|
60
58
|
|
61
59
|
defaultto { if @resource.class.defaultprovider.ancestors.include?(Puppet::Provider::ParsedFile)
|
62
60
|
@resource.class.defaultprovider.default_target
|
@@ -67,4 +65,3 @@ module Puppet
|
|
67
65
|
end
|
68
66
|
end
|
69
67
|
end
|
70
|
-
|
data/lib/puppet/type/stage.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
Puppet::Type.newtype(:stage) do
|
2
2
|
desc "A resource type for specifying run stages. The actual stage should
|
3
|
-
be specified on resources
|
4
|
-
|
3
|
+
be specified on resources:
|
4
|
+
|
5
|
+
class { foo: stage => pre }
|
5
6
|
|
6
|
-
And you must manually control stage order
|
7
|
+
And you must manually control stage order:
|
7
8
|
|
8
|
-
|
9
|
+
stage { pre: before => Stage[main] }
|
9
10
|
|
10
11
|
You automatically get a 'main' stage created, and by default all resources
|
11
12
|
get inserted into that stage.
|
data/lib/puppet/type/tidy.rb
CHANGED
@@ -5,7 +5,7 @@ Puppet::Type.newtype(:tidy) do
|
|
5
5
|
criteria are OR'd together, so a file that is too large but is not
|
6
6
|
old enough will still get tidied.
|
7
7
|
|
8
|
-
If you don't specify either
|
8
|
+
If you don't specify either `age` or `size`, then all files will
|
9
9
|
be removed.
|
10
10
|
|
11
11
|
This resource type works by generating a file resource for every file
|
@@ -47,7 +47,7 @@ Puppet::Type.newtype(:tidy) do
|
|
47
47
|
at least one of the patterns specified. Multiple patterns can
|
48
48
|
be specified using an array.
|
49
49
|
|
50
|
-
Example
|
50
|
+
Example:
|
51
51
|
|
52
52
|
tidy { \"/tmp\":
|
53
53
|
age => \"1w\",
|
@@ -55,7 +55,7 @@ Puppet::Type.newtype(:tidy) do
|
|
55
55
|
matches => [ \"[0-9]pub*.tmp\", \"*.temp\", \"tmpfile?\" ]
|
56
56
|
}
|
57
57
|
|
58
|
-
This removes files from
|
58
|
+
This removes files from `/tmp` if they are one week old or older,
|
59
59
|
are not in a subdirectory and match one of the shell globs given.
|
60
60
|
|
61
61
|
Note that the patterns are matched against the basename of each
|
data/lib/puppet/type/user.rb
CHANGED
@@ -12,7 +12,7 @@ module Puppet
|
|
12
12
|
|
13
13
|
This resource type uses the prescribed native tools for creating
|
14
14
|
groups and generally uses POSIX APIs for retrieving information
|
15
|
-
about them. It does not directly modify
|
15
|
+
about them. It does not directly modify `/etc/passwd` or anything."
|
16
16
|
|
17
17
|
feature :allows_duplicates,
|
18
18
|
"The provider supports duplicate users with the same UID."
|
@@ -381,4 +381,3 @@ module Puppet
|
|
381
381
|
end
|
382
382
|
end
|
383
383
|
end
|
384
|
-
|
data/lib/puppet/type/yumrepo.rb
CHANGED
@@ -52,8 +52,9 @@ module Puppet
|
|
52
52
|
|
53
53
|
newtype(:yumrepo) do
|
54
54
|
@doc = "The client-side description of a yum repository. Repository
|
55
|
-
configurations are found by parsing
|
56
|
-
the files indicated by reposdir in that file
|
55
|
+
configurations are found by parsing `/etc/yum.conf` and
|
56
|
+
the files indicated by the `reposdir` option in that file
|
57
|
+
(see yum.conf(5) for details)
|
57
58
|
|
58
59
|
Most parameters are identical to the ones documented
|
59
60
|
in yum.conf(5)
|
@@ -85,7 +86,7 @@ module Puppet
|
|
85
86
|
clear
|
86
87
|
inifile.each_section do |s|
|
87
88
|
next if s.name == "main"
|
88
|
-
obj =
|
89
|
+
obj = new(:name => s.name, :audit => check)
|
89
90
|
current_values = obj.retrieve
|
90
91
|
obj.eachproperty do |property|
|
91
92
|
if current_values[property].nil?
|
@@ -294,6 +295,12 @@ module Puppet
|
|
294
295
|
newvalue(%r{(0|1)}) { }
|
295
296
|
end
|
296
297
|
|
298
|
+
newproperty(:http_caching, :parent => Puppet::IniProperty) do
|
299
|
+
desc "Either 'packages' or 'all' or 'none'.\n#{ABSENT_DOC}"
|
300
|
+
newvalue(:absent) { self.should = :absent }
|
301
|
+
newvalue(%r(packages|all|none)) { }
|
302
|
+
end
|
303
|
+
|
297
304
|
newproperty(:timeout, :parent => Puppet::IniProperty) do
|
298
305
|
desc "Number of seconds to wait for a connection before timing
|
299
306
|
out.\n#{ABSENT_DOC}"
|
@@ -324,6 +331,12 @@ module Puppet
|
|
324
331
|
newvalue(%r{[1-9][0-9]?}) { }
|
325
332
|
end
|
326
333
|
|
334
|
+
newproperty(:cost, :parent => Puppet::IniProperty) do
|
335
|
+
desc "Cost of this repository.\n#{ABSENT_DOC}"
|
336
|
+
newvalue(:absent) { self.should = :absent }
|
337
|
+
newvalue(%r{\d+}) { }
|
338
|
+
end
|
339
|
+
|
327
340
|
newproperty(:proxy, :parent => Puppet::IniProperty) do
|
328
341
|
desc "URL to the proxy server for this repository.\n#{ABSENT_DOC}"
|
329
342
|
newvalue(:absent) { self.should = :absent }
|
data/lib/puppet/type/zfs.rb
CHANGED
data/lib/puppet/type/zone.rb
CHANGED
@@ -69,9 +69,9 @@ Puppet::Type.newtype(:zone) do
|
|
69
69
|
|
70
70
|
ensurable do
|
71
71
|
desc "The running state of the zone. The valid states directly reflect
|
72
|
-
the states that
|
73
|
-
in that a zone must be
|
74
|
-
only then can be
|
72
|
+
the states that `zoneadm` provides. The states are linear,
|
73
|
+
in that a zone must be `configured` then `installed`, and
|
74
|
+
only then can be `running`. Note also that `halt` is currently
|
75
75
|
used to stop zones."
|
76
76
|
|
77
77
|
@states = {}
|
@@ -313,31 +313,31 @@ Puppet::Type.newtype(:zone) do
|
|
313
313
|
# only used to boot the zone the very first time.
|
314
314
|
newparam(:sysidcfg) do
|
315
315
|
desc %{The text to go into the sysidcfg file when the zone is first
|
316
|
-
booted. The best way is to use a template
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
And then call that
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
316
|
+
booted. The best way is to use a template:
|
317
|
+
|
318
|
+
# $templatedir/sysidcfg
|
319
|
+
system_locale=en_US
|
320
|
+
timezone=GMT
|
321
|
+
terminal=xterms
|
322
|
+
security_policy=NONE
|
323
|
+
root_password=<%= password %>
|
324
|
+
timeserver=localhost
|
325
|
+
name_service=DNS {domain_name=<%= domain %> name_server=<%= nameserver %>}
|
326
|
+
network_interface=primary {hostname=<%= realhostname %>
|
327
|
+
ip_address=<%= ip %>
|
328
|
+
netmask=<%= netmask %>
|
329
|
+
protocol_ipv6=no
|
330
|
+
default_route=<%= defaultroute %>}
|
331
|
+
nfs4_domain=dynamic
|
332
|
+
|
333
|
+
And then call that:
|
334
|
+
|
335
|
+
zone { myzone:
|
336
|
+
ip => "bge0:192.168.0.23",
|
337
|
+
sysidcfg => template(sysidcfg),
|
338
|
+
path => "/opt/zones/myzone",
|
339
|
+
realhostname => "fully.qualified.domain.name"
|
340
|
+
}
|
341
341
|
|
342
342
|
The sysidcfg only matters on the first booting of the zone,
|
343
343
|
so Puppet only checks for it at that time.}
|
data/lib/puppet/type/zpool.rb
CHANGED
@@ -44,8 +44,11 @@ module Puppet
|
|
44
44
|
end
|
45
45
|
|
46
46
|
newproperty(:mirror, :array_matching => :all, :parent => Puppet::Property::MultiVDev) do
|
47
|
-
desc "List of all the devices to mirror for this pool. Each mirror should be a space separated string
|
48
|
-
|
47
|
+
desc "List of all the devices to mirror for this pool. Each mirror should be a space separated string:
|
48
|
+
|
49
|
+
mirror => [\"disk1 disk2\", \"disk3 disk4\"]
|
50
|
+
|
51
|
+
"
|
49
52
|
|
50
53
|
validate do |value|
|
51
54
|
raise ArgumentError, "mirror names must be provided as string separated, not a comma-separated list" if value.include?(",")
|
@@ -53,8 +56,11 @@ module Puppet
|
|
53
56
|
end
|
54
57
|
|
55
58
|
newproperty(:raidz, :array_matching => :all, :parent => Puppet::Property::MultiVDev) do
|
56
|
-
desc "List of all the devices to raid for this pool. Should be an array of space separated strings
|
57
|
-
|
59
|
+
desc "List of all the devices to raid for this pool. Should be an array of space separated strings:
|
60
|
+
|
61
|
+
raidz => [\"disk1 disk2\", \"disk3 disk4\"]
|
62
|
+
|
63
|
+
"
|
58
64
|
|
59
65
|
validate do |value|
|
60
66
|
raise ArgumentError, "raid names must be provided as string separated, not a comma-separated list" if value.include?(",")
|
@@ -84,4 +90,3 @@ module Puppet
|
|
84
90
|
end
|
85
91
|
end
|
86
92
|
end
|
87
|
-
|