puppet 2.7.6 → 2.7.8
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 +168 -0
- data/conf/auth.conf +5 -4
- data/conf/redhat/puppet.spec +16 -1
- data/conf/solaris/pkginfo +2 -2
- data/conf/suse/puppet.spec +9 -3
- data/ext/upload_facts.rb +120 -0
- data/install.rb +11 -16
- data/lib/puppet.rb +1 -1
- data/lib/puppet/application/agent.rb +0 -3
- data/lib/puppet/application/apply.rb +0 -3
- data/lib/puppet/application/queue.rb +21 -1
- data/lib/puppet/defaults.rb +6 -4
- data/lib/puppet/face/file/store.rb +1 -1
- data/lib/puppet/feature/base.rb +2 -1
- data/lib/puppet/file_bucket/dipper.rb +3 -2
- data/lib/puppet/file_serving/content.rb +1 -1
- data/lib/puppet/file_serving/metadata.rb +5 -2
- data/lib/puppet/indirector/facts/inventory_service.rb +20 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +3 -2
- data/lib/puppet/indirector/report/processor.rb +1 -1
- data/lib/puppet/network/handler/filebucket.rb +2 -0
- data/lib/puppet/network/handler/fileserver.rb +1 -1
- data/lib/puppet/network/handler/master.rb +1 -0
- data/lib/puppet/network/handler/report.rb +2 -0
- data/lib/puppet/network/handler/runner.rb +1 -0
- data/lib/puppet/network/handler/status.rb +2 -0
- data/lib/puppet/network/http/mongrel/rest.rb +8 -1
- data/lib/puppet/network/http_server.rb +3 -0
- data/lib/puppet/network/http_server/mongrel.rb +129 -0
- data/lib/puppet/network/rest_authconfig.rb +12 -4
- data/lib/puppet/parameter.rb +18 -0
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/grammar.ra +1 -1
- data/lib/puppet/parser/parser.rb +360 -350
- data/lib/puppet/property.rb +3 -3
- data/lib/puppet/provider/augeas/augeas.rb +1 -1
- data/lib/puppet/provider/exec/windows.rb +6 -7
- data/lib/puppet/provider/file/windows.rb +9 -2
- data/lib/puppet/provider/group/aix.rb +8 -8
- data/lib/puppet/provider/group/groupadd.rb +1 -3
- data/lib/puppet/provider/group/ldap.rb +8 -10
- data/lib/puppet/provider/group/windows_adsi.rb +8 -2
- data/lib/puppet/provider/package/aix.rb +1 -1
- data/lib/puppet/provider/package/macports.rb +3 -3
- data/lib/puppet/provider/package/msi.rb +12 -5
- data/lib/puppet/provider/package/nim.rb +1 -1
- data/lib/puppet/provider/package/pkgdmg.rb +3 -3
- data/lib/puppet/provider/package/ports.rb +1 -1
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +560 -0
- data/lib/puppet/provider/service/base.rb +2 -2
- data/lib/puppet/provider/service/bsd.rb +4 -3
- data/lib/puppet/provider/service/daemontools.rb +25 -25
- data/lib/puppet/provider/service/debian.rb +6 -4
- data/lib/puppet/provider/service/freebsd.rb +1 -1
- data/lib/puppet/provider/service/gentoo.rb +4 -3
- data/lib/puppet/provider/service/init.rb +3 -8
- data/lib/puppet/provider/service/launchd.rb +129 -96
- data/lib/puppet/provider/service/redhat.rb +2 -3
- data/lib/puppet/provider/service/runit.rb +20 -20
- data/lib/puppet/provider/service/smf.rb +8 -7
- data/lib/puppet/provider/service/src.rb +5 -6
- data/lib/puppet/provider/service/systemd.rb +1 -1
- data/lib/puppet/provider/service/upstart.rb +3 -5
- data/lib/puppet/provider/service/windows.rb +7 -7
- data/lib/puppet/provider/sshkey/parsed.rb +2 -3
- data/lib/puppet/provider/user/aix.rb +21 -21
- data/lib/puppet/provider/user/hpux.rb +3 -1
- data/lib/puppet/provider/user/ldap.rb +7 -7
- data/lib/puppet/provider/user/user_role_add.rb +10 -6
- data/lib/puppet/provider/user/useradd.rb +3 -1
- data/lib/puppet/provider/user/windows_adsi.rb +4 -3
- data/lib/puppet/rb_tree_map.rb +388 -0
- data/lib/puppet/reference/configuration.rb +7 -7
- data/lib/puppet/reference/indirection.rb +5 -6
- data/lib/puppet/reference/metaparameter.rb +3 -1
- data/lib/puppet/reference/network.rb +8 -8
- data/lib/puppet/reference/providers.rb +17 -21
- data/lib/puppet/reference/type.rb +12 -9
- data/lib/puppet/resource.rb +2 -5
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/ssl/certificate_request.rb +70 -0
- data/lib/puppet/ssl/host.rb +6 -0
- data/lib/puppet/transaction.rb +158 -55
- data/lib/puppet/transaction/event_manager.rb +1 -1
- data/lib/puppet/type.rb +60 -30
- data/lib/puppet/type/augeas.rb +83 -49
- data/lib/puppet/type/computer.rb +1 -1
- data/lib/puppet/type/cron.rb +11 -11
- data/lib/puppet/type/exec.rb +28 -21
- data/lib/puppet/type/file.rb +17 -7
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +15 -12
- data/lib/puppet/type/file/mode.rb +30 -5
- data/lib/puppet/type/file/source.rb +11 -10
- data/lib/puppet/type/file/target.rb +2 -2
- data/lib/puppet/type/filebucket.rb +1 -1
- data/lib/puppet/type/group.rb +4 -5
- data/lib/puppet/type/host.rb +1 -1
- data/lib/puppet/type/interface.rb +13 -10
- data/lib/puppet/type/k5login.rb +6 -6
- data/lib/puppet/type/macauthorization.rb +37 -36
- data/lib/puppet/type/maillist.rb +2 -2
- data/lib/puppet/type/mcx.rb +6 -6
- data/lib/puppet/type/mount.rb +3 -2
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/package.rb +24 -23
- data/lib/puppet/type/router.rb +4 -1
- data/lib/puppet/type/schedule.rb +52 -44
- data/lib/puppet/type/scheduled_task.rb +222 -0
- data/lib/puppet/type/selmodule.rb +10 -6
- data/lib/puppet/type/service.rb +11 -11
- data/lib/puppet/type/ssh_authorized_key.rb +2 -5
- data/lib/puppet/type/sshkey.rb +1 -1
- data/lib/puppet/type/stage.rb +1 -1
- data/lib/puppet/type/tidy.rb +10 -8
- data/lib/puppet/type/user.rb +61 -53
- data/lib/puppet/type/vlan.rb +4 -4
- data/lib/puppet/type/whit.rb +6 -2
- data/lib/puppet/type/yumrepo.rb +33 -31
- data/lib/puppet/type/zfs.rb +34 -32
- data/lib/puppet/type/zone.rb +21 -19
- data/lib/puppet/type/zpool.rb +3 -3
- data/lib/puppet/util.rb +24 -6
- data/lib/puppet/util/adsi.rb +12 -7
- data/lib/puppet/util/checksums.rb +1 -1
- data/lib/puppet/util/diff.rb +1 -1
- data/lib/puppet/util/nagios_maker.rb +2 -2
- data/lib/puppet/util/reference.rb +16 -17
- data/lib/puppet/util/settings/file_setting.rb +14 -2
- data/lib/puppet/util/windows/security.rb +96 -32
- data/spec/integration/file_serving/terminus_helper_spec.rb +1 -1
- data/spec/integration/indirector/direct_file_server_spec.rb +9 -15
- data/spec/integration/indirector/file_content/file_server_spec.rb +1 -1
- data/spec/integration/indirector/file_metadata/file_server_spec.rb +1 -1
- data/spec/integration/provider/package_spec.rb +4 -0
- data/spec/integration/provider/service/init_spec.rb +8 -2
- data/spec/integration/reference/providers_spec.rb +1 -1
- data/spec/integration/ssl/certificate_request_spec.rb +1 -2
- data/spec/integration/ssl/certificate_revocation_list_spec.rb +1 -2
- data/spec/integration/ssl/host_spec.rb +1 -2
- data/spec/integration/transaction_spec.rb +25 -17
- data/spec/integration/type/exec_spec.rb +77 -0
- data/spec/integration/type/file_spec.rb +322 -2
- data/spec/integration/util/windows/security_spec.rb +393 -230
- data/spec/integration/util_spec.rb +16 -0
- data/spec/lib/puppet_spec/files.rb +3 -7
- data/spec/unit/application/apply_spec.rb +0 -9
- data/spec/unit/application/inspect_spec.rb +1 -0
- data/spec/unit/configurer/downloader_spec.rb +3 -3
- data/spec/unit/face/certificate_spec.rb +6 -2
- data/spec/unit/file_bucket/dipper_spec.rb +67 -10
- data/spec/unit/file_bucket/file_spec.rb +22 -28
- data/spec/unit/file_serving/content_spec.rb +1 -1
- data/spec/unit/file_serving/metadata_spec.rb +30 -3
- data/spec/unit/indirector/facts/inventory_service_spec.rb +22 -0
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +21 -24
- data/spec/unit/indirector/node/store_configs_spec.rb +1 -0
- data/spec/unit/indirector/resource/ral_spec.rb +1 -1
- data/spec/unit/indirector/resource_type/parser_spec.rb +2 -2
- data/spec/unit/indirector/rest_spec.rb +1 -1
- data/spec/unit/network/handler/ca_spec.rb +1 -1
- data/spec/unit/network/http/mongrel/rest_spec.rb +54 -25
- data/spec/unit/parameter_spec.rb +36 -0
- data/spec/unit/parser/parser_spec.rb +4 -0
- data/spec/unit/property_spec.rb +2 -2
- data/spec/unit/provider/exec/windows_spec.rb +2 -8
- data/spec/unit/provider/file/posix_spec.rb +6 -0
- data/spec/unit/provider/file/windows_spec.rb +18 -0
- data/spec/unit/provider/group/windows_adsi_spec.rb +22 -6
- data/spec/unit/provider/mount/parsed_spec.rb +1 -1
- data/spec/unit/provider/package/msi_spec.rb +2 -2
- data/spec/unit/provider/scheduled_task/win32_taskscheduler_spec.rb +1571 -0
- data/spec/unit/provider/service/launchd_spec.rb +143 -130
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +5 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +39 -9
- data/spec/unit/provider/user/useradd_spec.rb +1 -1
- data/spec/unit/provider/user/windows_adsi_spec.rb +8 -1
- data/spec/unit/rb_tree_map_spec.rb +572 -0
- data/spec/unit/resource/catalog_spec.rb +1 -1
- data/spec/unit/simple_graph_spec.rb +9 -9
- data/spec/unit/ssl/host_spec.rb +60 -12
- data/spec/unit/transaction/report_spec.rb +3 -3
- data/spec/unit/transaction_spec.rb +394 -11
- data/spec/unit/type/exec_spec.rb +35 -15
- data/spec/unit/type/file/content_spec.rb +11 -10
- data/spec/unit/type/file/mode_spec.rb +73 -19
- data/spec/unit/type/file/source_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +15 -0
- data/spec/unit/type/group_spec.rb +1 -1
- data/spec/unit/type/mount_spec.rb +5 -5
- data/spec/unit/type/resources_spec.rb +3 -3
- data/spec/unit/type/scheduled_task_spec.rb +102 -0
- data/spec/unit/type/ssh_authorized_key_spec.rb +2 -3
- data/spec/unit/type/user_spec.rb +2 -1
- data/spec/unit/type_spec.rb +48 -4
- data/spec/unit/util/adsi_spec.rb +18 -7
- data/spec/unit/util/checksums_spec.rb +20 -2
- data/spec/unit/util/execution_stub_spec.rb +10 -5
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/rdoc/parser_spec.rb +1 -1
- data/spec/unit/util/reference_spec.rb +29 -0
- data/spec/unit/util/settings/file_setting_spec.rb +8 -2
- data/spec/unit/util_spec.rb +115 -0
- data/test/other/transactions.rb +5 -11
- data/test/ral/type/exec.rb +1 -1
- metadata +24 -11
data/lib/puppet/type/whit.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
Puppet::Type.newtype(:whit) do
|
2
|
-
desc "
|
2
|
+
desc "Whits are internal artifacts of Puppet's current implementation, and
|
3
|
+
Puppet suppresses their appearance in all logs. We make no guarantee of
|
4
|
+
the whit's continued existence, and it should never be used in an actual
|
5
|
+
manifest. Use the `anchor` type from the puppetlabs-stdlib module if you
|
6
|
+
need arbitrary whit-like no-op resources."
|
3
7
|
|
4
8
|
newparam :name do
|
5
9
|
desc "The name of the whit, because it must have one."
|
@@ -18,6 +22,6 @@ Puppet::Type.newtype(:whit) do
|
|
18
22
|
def refresh
|
19
23
|
# We don't do anything with them, but we need this to
|
20
24
|
# show that we are "refresh aware" and not break the
|
21
|
-
# chain of
|
25
|
+
# chain of propagation.
|
22
26
|
end
|
23
27
|
end
|
data/lib/puppet/type/yumrepo.rb
CHANGED
@@ -48,20 +48,20 @@ module Puppet
|
|
48
48
|
end
|
49
49
|
|
50
50
|
# Doc string for properties that can be made 'absent'
|
51
|
-
ABSENT_DOC="Set this to
|
51
|
+
ABSENT_DOC="Set this to `absent` to remove it from the file completely."
|
52
52
|
|
53
53
|
newtype(:yumrepo) do
|
54
54
|
@doc = "The client-side description of a yum repository. Repository
|
55
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)
|
56
|
+
the files indicated by the `reposdir` option in that file
|
57
|
+
(see `yum.conf(5)` for details).
|
58
58
|
|
59
59
|
Most parameters are identical to the ones documented
|
60
|
-
in yum.conf(5)
|
60
|
+
in the `yum.conf(5)` man page.
|
61
61
|
|
62
|
-
Continuation lines that yum supports for
|
63
|
-
|
64
|
-
files
|
62
|
+
Continuation lines that yum supports (for the `baseurl`, for example)
|
63
|
+
are not supported. This type does not attempt to read or verify the
|
64
|
+
exinstence of files listed in the `include` attribute."
|
65
65
|
|
66
66
|
class << self
|
67
67
|
attr_accessor :filetype
|
@@ -200,13 +200,13 @@ module Puppet
|
|
200
200
|
|
201
201
|
newparam(:name) do
|
202
202
|
desc "The name of the repository. This corresponds to the
|
203
|
-
repositoryid parameter in yum.conf(5)
|
203
|
+
`repositoryid` parameter in `yum.conf(5)`."
|
204
204
|
isnamevar
|
205
205
|
end
|
206
206
|
|
207
207
|
newproperty(:descr, :parent => Puppet::IniProperty) do
|
208
|
-
desc "A human
|
209
|
-
This corresponds to the name parameter in yum.conf(5)
|
208
|
+
desc "A human-readable description of the repository.
|
209
|
+
This corresponds to the name parameter in `yum.conf(5)`.
|
210
210
|
#{ABSENT_DOC}"
|
211
211
|
newvalue(:absent) { self.should = :absent }
|
212
212
|
newvalue(/.*/) { }
|
@@ -222,37 +222,39 @@ module Puppet
|
|
222
222
|
end
|
223
223
|
|
224
224
|
newproperty(:baseurl, :parent => Puppet::IniProperty) do
|
225
|
-
desc "The URL for this repository
|
225
|
+
desc "The URL for this repository. #{ABSENT_DOC}"
|
226
226
|
newvalue(:absent) { self.should = :absent }
|
227
227
|
# Should really check that it's a valid URL
|
228
228
|
newvalue(/.*/) { }
|
229
229
|
end
|
230
230
|
|
231
231
|
newproperty(:enabled, :parent => Puppet::IniProperty) do
|
232
|
-
desc "Whether this repository is enabled
|
233
|
-
|
232
|
+
desc "Whether this repository is enabled, as represented by a
|
233
|
+
`0` or `1`. #{ABSENT_DOC}"
|
234
234
|
newvalue(:absent) { self.should = :absent }
|
235
235
|
newvalue(%r{(0|1)}) { }
|
236
236
|
end
|
237
237
|
|
238
238
|
newproperty(:gpgcheck, :parent => Puppet::IniProperty) do
|
239
239
|
desc "Whether to check the GPG signature on packages installed
|
240
|
-
from this repository
|
241
|
-
|
240
|
+
from this repository, as represented by a `0` or `1`.
|
241
|
+
#{ABSENT_DOC}"
|
242
242
|
newvalue(:absent) { self.should = :absent }
|
243
243
|
newvalue(%r{(0|1)}) { }
|
244
244
|
end
|
245
245
|
|
246
246
|
newproperty(:gpgkey, :parent => Puppet::IniProperty) do
|
247
247
|
desc "The URL for the GPG key with which packages from this
|
248
|
-
repository are signed
|
248
|
+
repository are signed. #{ABSENT_DOC}"
|
249
249
|
newvalue(:absent) { self.should = :absent }
|
250
250
|
# Should really check that it's a valid URL
|
251
251
|
newvalue(/.*/) { }
|
252
252
|
end
|
253
253
|
|
254
254
|
newproperty(:include, :parent => Puppet::IniProperty) do
|
255
|
-
desc "
|
255
|
+
desc "The URL of a remote file containing additional yum configuration
|
256
|
+
settings. Puppet does not check for this file's existence or validity.
|
257
|
+
#{ABSENT_DOC}"
|
256
258
|
newvalue(:absent) { self.should = :absent }
|
257
259
|
# Should really check that it's a valid URL
|
258
260
|
newvalue(/.*/) { }
|
@@ -269,41 +271,41 @@ module Puppet
|
|
269
271
|
newproperty(:includepkgs, :parent => Puppet::IniProperty) do
|
270
272
|
desc "List of shell globs. If this is set, only packages
|
271
273
|
matching one of the globs will be considered for
|
272
|
-
update or install
|
274
|
+
update or install from this repo. #{ABSENT_DOC}"
|
273
275
|
newvalue(:absent) { self.should = :absent }
|
274
276
|
newvalue(/.*/) { }
|
275
277
|
end
|
276
278
|
|
277
279
|
newproperty(:enablegroups, :parent => Puppet::IniProperty) do
|
278
|
-
desc "
|
279
|
-
|
280
|
-
values are '0', and '1'.\n#{ABSENT_DOC}"
|
280
|
+
desc "Whether yum will allow the use of package groups for this
|
281
|
+
repository, as represented by a `0` or `1`. #{ABSENT_DOC}"
|
281
282
|
newvalue(:absent) { self.should = :absent }
|
282
283
|
newvalue(%r{(0|1)}) { }
|
283
284
|
end
|
284
285
|
|
285
286
|
newproperty(:failovermethod, :parent => Puppet::IniProperty) do
|
286
|
-
desc "
|
287
|
+
desc "The failover methode for this repository; should be either
|
288
|
+
`roundrobin` or `priority`. #{ABSENT_DOC}"
|
287
289
|
newvalue(:absent) { self.should = :absent }
|
288
290
|
newvalue(%r{roundrobin|priority}) { }
|
289
291
|
end
|
290
292
|
|
291
293
|
newproperty(:keepalive, :parent => Puppet::IniProperty) do
|
292
|
-
desc "
|
293
|
-
|
294
|
+
desc "Whether HTTP/1.1 keepalive should be used with this repository, as
|
295
|
+
represented by a `0` or `1`. #{ABSENT_DOC}"
|
294
296
|
newvalue(:absent) { self.should = :absent }
|
295
297
|
newvalue(%r{(0|1)}) { }
|
296
298
|
end
|
297
299
|
|
298
300
|
newproperty(:http_caching, :parent => Puppet::IniProperty) do
|
299
|
-
desc "
|
301
|
+
desc "What to cache from this repository. #{ABSENT_DOC}"
|
300
302
|
newvalue(:absent) { self.should = :absent }
|
301
303
|
newvalue(%r(packages|all|none)) { }
|
302
304
|
end
|
303
305
|
|
304
306
|
newproperty(:timeout, :parent => Puppet::IniProperty) do
|
305
307
|
desc "Number of seconds to wait for a connection before timing
|
306
|
-
out
|
308
|
+
out. #{ABSENT_DOC}"
|
307
309
|
newvalue(:absent) { self.should = :absent }
|
308
310
|
newvalue(%r{[0-9]+}) { }
|
309
311
|
end
|
@@ -317,7 +319,7 @@ module Puppet
|
|
317
319
|
|
318
320
|
newproperty(:protect, :parent => Puppet::IniProperty) do
|
319
321
|
desc "Enable or disable protection for this repository. Requires
|
320
|
-
that the protectbase plugin is installed and enabled.
|
322
|
+
that the `protectbase` plugin is installed and enabled.
|
321
323
|
#{ABSENT_DOC}"
|
322
324
|
newvalue(:absent) { self.should = :absent }
|
323
325
|
newvalue(%r{(0|1)}) { }
|
@@ -325,7 +327,7 @@ module Puppet
|
|
325
327
|
|
326
328
|
newproperty(:priority, :parent => Puppet::IniProperty) do
|
327
329
|
desc "Priority of this repository from 1-99. Requires that
|
328
|
-
the priorities plugin is installed and enabled.
|
330
|
+
the `priorities` plugin is installed and enabled.
|
329
331
|
#{ABSENT_DOC}"
|
330
332
|
newvalue(:absent) { self.should = :absent }
|
331
333
|
newvalue(%r{[1-9][0-9]?}) { }
|
@@ -338,20 +340,20 @@ module Puppet
|
|
338
340
|
end
|
339
341
|
|
340
342
|
newproperty(:proxy, :parent => Puppet::IniProperty) do
|
341
|
-
desc "URL to the proxy server for this repository
|
343
|
+
desc "URL to the proxy server for this repository. #{ABSENT_DOC}"
|
342
344
|
newvalue(:absent) { self.should = :absent }
|
343
345
|
# Should really check that it's a valid URL
|
344
346
|
newvalue(/.*/) { }
|
345
347
|
end
|
346
348
|
|
347
349
|
newproperty(:proxy_username, :parent => Puppet::IniProperty) do
|
348
|
-
desc "Username for this proxy
|
350
|
+
desc "Username for this proxy. #{ABSENT_DOC}"
|
349
351
|
newvalue(:absent) { self.should = :absent }
|
350
352
|
newvalue(/.*/) { }
|
351
353
|
end
|
352
354
|
|
353
355
|
newproperty(:proxy_password, :parent => Puppet::IniProperty) do
|
354
|
-
desc "Password for this proxy
|
356
|
+
desc "Password for this proxy. #{ABSENT_DOC}"
|
355
357
|
newvalue(:absent) { self.should = :absent }
|
356
358
|
newvalue(/.*/) { }
|
357
359
|
end
|
data/lib/puppet/type/zfs.rb
CHANGED
@@ -2,132 +2,134 @@ module Puppet
|
|
2
2
|
newtype(:zfs) do
|
3
3
|
@doc = "Manage zfs. Create destroy and set properties on zfs instances.
|
4
4
|
|
5
|
-
**Autorequires:** If Puppet is managing the zpool at the root of this zfs
|
5
|
+
**Autorequires:** If Puppet is managing the zpool at the root of this zfs
|
6
|
+
instance, the zfs resource will autorequire it. If Puppet is managing any
|
7
|
+
parent zfs instances, the zfs resource will autorequire them."
|
6
8
|
|
7
9
|
ensurable
|
8
10
|
|
9
11
|
newparam(:name) do
|
10
|
-
desc "The full name for this filesystem
|
12
|
+
desc "The full name for this filesystem (including the zpool)."
|
11
13
|
end
|
12
14
|
|
13
15
|
newproperty(:aclinherit) do
|
14
|
-
desc "The aclinherit property.
|
16
|
+
desc "The aclinherit property. Valid values are `discard`, `noallow`, `restricted`, `passthrough`, `passthrough-x`."
|
15
17
|
end
|
16
18
|
|
17
19
|
newproperty(:aclmode) do
|
18
|
-
desc "The aclmode property.
|
20
|
+
desc "The aclmode property. Valid values are `discard`, `groupmask`, `passthrough`."
|
19
21
|
end
|
20
22
|
|
21
23
|
newproperty(:atime) do
|
22
|
-
desc "The atime property.
|
24
|
+
desc "The atime property. Valid values are `on`, `off`."
|
23
25
|
end
|
24
26
|
|
25
27
|
newproperty(:canmount) do
|
26
|
-
desc "The canmount property.
|
28
|
+
desc "The canmount property. Valid values are `on`, `off`, `noauto`."
|
27
29
|
end
|
28
30
|
|
29
31
|
newproperty(:checksum) do
|
30
|
-
desc "The checksum property.
|
32
|
+
desc "The checksum property. Valid values are `on`, `off`, `fletcher2`, `fletcher4`, `sha256`."
|
31
33
|
end
|
32
34
|
|
33
35
|
newproperty(:compression) do
|
34
|
-
desc "The compression property.
|
36
|
+
desc "The compression property. Valid values are `on`, `off`, `lzjb`, `gzip`, `gzip-[1-9]`, `zle`."
|
35
37
|
end
|
36
38
|
|
37
39
|
newproperty(:copies) do
|
38
|
-
desc "The copies property.
|
40
|
+
desc "The copies property. Valid values are `1`, `2`, `3`."
|
39
41
|
end
|
40
42
|
|
41
43
|
newproperty(:devices) do
|
42
|
-
desc "The devices property.
|
44
|
+
desc "The devices property. Valid values are `on`, `off`."
|
43
45
|
end
|
44
46
|
|
45
47
|
newproperty(:exec) do
|
46
|
-
desc "The exec property.
|
48
|
+
desc "The exec property. Valid values are `on`, `off`."
|
47
49
|
end
|
48
50
|
|
49
51
|
newproperty(:logbias) do
|
50
|
-
desc "The logbias property.
|
52
|
+
desc "The logbias property. Valid values are `latency`, `throughput`."
|
51
53
|
end
|
52
54
|
|
53
55
|
newproperty(:mountpoint) do
|
54
|
-
desc "The mountpoint property.
|
56
|
+
desc "The mountpoint property. Valid values are `<path>`, `legacy`, `none`."
|
55
57
|
end
|
56
58
|
|
57
59
|
newproperty(:nbmand) do
|
58
|
-
desc "The nbmand property.
|
60
|
+
desc "The nbmand property. Valid values are `on`, `off`."
|
59
61
|
end
|
60
62
|
|
61
63
|
newproperty(:primarycache) do
|
62
|
-
desc "The primarycache property.
|
64
|
+
desc "The primarycache property. Valid values are `all`, `none`, `metadata`."
|
63
65
|
end
|
64
66
|
|
65
67
|
newproperty(:quota) do
|
66
|
-
desc "The quota property.
|
68
|
+
desc "The quota property. Valid values are `<size>`, `none`."
|
67
69
|
end
|
68
70
|
|
69
71
|
newproperty(:readonly) do
|
70
|
-
desc "The readonly property.
|
72
|
+
desc "The readonly property. Valid values are `on`, `off`."
|
71
73
|
end
|
72
74
|
|
73
75
|
newproperty(:recordsize) do
|
74
|
-
desc "The recordsize property.
|
76
|
+
desc "The recordsize property. Valid values are powers of two between 512 and 128k."
|
75
77
|
end
|
76
78
|
|
77
79
|
newproperty(:refquota) do
|
78
|
-
desc "The refquota property.
|
80
|
+
desc "The refquota property. Valid values are `<size>`, `none`."
|
79
81
|
end
|
80
82
|
|
81
83
|
newproperty(:refreservation) do
|
82
|
-
desc "The refreservation property.
|
84
|
+
desc "The refreservation property. Valid values are `<size>`, `none`."
|
83
85
|
end
|
84
86
|
|
85
87
|
newproperty(:reservation) do
|
86
|
-
desc "The reservation property.
|
88
|
+
desc "The reservation property. Valid values are `<size>`, `none`."
|
87
89
|
end
|
88
90
|
|
89
91
|
newproperty(:secondarycache) do
|
90
|
-
desc "The secondarycache property.
|
92
|
+
desc "The secondarycache property. Valid values are `all`, `none`, `metadata`."
|
91
93
|
end
|
92
94
|
|
93
95
|
newproperty(:setuid) do
|
94
|
-
desc "The setuid property.
|
96
|
+
desc "The setuid property. Valid values are `on`, `off`."
|
95
97
|
end
|
96
98
|
|
97
99
|
newproperty(:shareiscsi) do
|
98
|
-
desc "The shareiscsi property.
|
100
|
+
desc "The shareiscsi property. Valid values are `on`, `off`, `type=<type>`."
|
99
101
|
end
|
100
102
|
|
101
103
|
newproperty(:sharenfs) do
|
102
|
-
desc "The sharenfs property.
|
104
|
+
desc "The sharenfs property. Valid values are `on`, `off`, share(1M) options"
|
103
105
|
end
|
104
106
|
|
105
107
|
newproperty(:sharesmb) do
|
106
|
-
desc "The sharesmb property.
|
108
|
+
desc "The sharesmb property. Valid values are `on`, `off`, sharemgr(1M) options"
|
107
109
|
end
|
108
110
|
|
109
111
|
newproperty(:snapdir) do
|
110
|
-
desc "The snapdir property.
|
112
|
+
desc "The snapdir property. Valid values are `hidden`, `visible`."
|
111
113
|
end
|
112
114
|
|
113
115
|
newproperty(:version) do
|
114
|
-
desc "The version property.
|
116
|
+
desc "The version property. Valid values are `1`, `2`, `3`, `4`, `current`."
|
115
117
|
end
|
116
118
|
|
117
119
|
newproperty(:volsize) do
|
118
|
-
desc "The volsize property.
|
120
|
+
desc "The volsize property. Valid values are `<size>`"
|
119
121
|
end
|
120
122
|
|
121
123
|
newproperty(:vscan) do
|
122
|
-
desc "The vscan property.
|
124
|
+
desc "The vscan property. Valid values are `on`, `off`."
|
123
125
|
end
|
124
126
|
|
125
127
|
newproperty(:xattr) do
|
126
|
-
desc "The xattr property.
|
128
|
+
desc "The xattr property. Valid values are `on`, `off`."
|
127
129
|
end
|
128
130
|
|
129
131
|
newproperty(:zoned) do
|
130
|
-
desc "The zoned property.
|
132
|
+
desc "The zoned property. Valid values are `on`, `off`."
|
131
133
|
end
|
132
134
|
|
133
135
|
autorequire(:zpool) do
|
data/lib/puppet/type/zone.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
Puppet::Type.newtype(:zone) do
|
2
|
-
@doc = "Solaris zones.
|
2
|
+
@doc = "Manages Solaris zones.
|
3
3
|
|
4
|
-
**Autorequires:** If Puppet is managing the directory specified as the root of
|
4
|
+
**Autorequires:** If Puppet is managing the directory specified as the root of
|
5
|
+
the zone's filesystem (with the `path` attribute), the zone resource will
|
6
|
+
autorequire that directory."
|
5
7
|
|
6
8
|
# These properties modify the zone configuration, and they need to provide
|
7
9
|
# the text separately from syncing it, so all config statements can be rolled
|
@@ -72,7 +74,7 @@ Puppet::Type.newtype(:zone) do
|
|
72
74
|
ensurable do
|
73
75
|
desc "The running state of the zone. The valid states directly reflect
|
74
76
|
the states that `zoneadm` provides. The states are linear,
|
75
|
-
in that a zone must be `configured
|
77
|
+
in that a zone must be `configured`, then `installed`, and
|
76
78
|
only then can be `running`. Note also that `halt` is currently
|
77
79
|
used to stop zones."
|
78
80
|
|
@@ -198,8 +200,8 @@ Puppet::Type.newtype(:zone) do
|
|
198
200
|
newparam(:clone) do
|
199
201
|
desc "Instead of installing the zone, clone it from another zone.
|
200
202
|
If the zone root resides on a zfs file system, a snapshot will be
|
201
|
-
used to create the clone
|
202
|
-
will be used. The zone you clone
|
203
|
+
used to create the clone; if it resides on a ufs filesystem, a copy of the
|
204
|
+
zone will be used. The zone from which you clone must not be running."
|
203
205
|
end
|
204
206
|
|
205
207
|
newproperty(:ip, :parent => ZoneMultiConfigProperty) do
|
@@ -243,7 +245,7 @@ Puppet::Type.newtype(:zone) do
|
|
243
245
|
end
|
244
246
|
|
245
247
|
newproperty(:iptype, :parent => ZoneConfigProperty) do
|
246
|
-
desc "The IP stack type of the zone.
|
248
|
+
desc "The IP stack type of the zone."
|
247
249
|
|
248
250
|
defaultto :shared
|
249
251
|
|
@@ -285,9 +287,9 @@ Puppet::Type.newtype(:zone) do
|
|
285
287
|
end
|
286
288
|
|
287
289
|
newproperty(:dataset, :parent => ZoneMultiConfigProperty) do
|
288
|
-
desc "The list of datasets delegated to the non
|
289
|
-
global zone. All datasets must be zfs filesystem names which
|
290
|
-
different
|
290
|
+
desc "The list of datasets delegated to the non-global zone from the
|
291
|
+
global zone. All datasets must be zfs filesystem names which are
|
292
|
+
different from the mountpoint."
|
291
293
|
|
292
294
|
validate do |value|
|
293
295
|
unless value !~ /^\//
|
@@ -341,10 +343,10 @@ Puppet::Type.newtype(:zone) do
|
|
341
343
|
# Specify the sysidcfg file. This is pretty hackish, because it's
|
342
344
|
# only used to boot the zone the very first time.
|
343
345
|
newparam(:sysidcfg) do
|
344
|
-
desc %{The text to go into the sysidcfg file when the zone is first
|
346
|
+
desc %{The text to go into the `sysidcfg` file when the zone is first
|
345
347
|
booted. The best way is to use a template:
|
346
348
|
|
347
|
-
# $
|
349
|
+
# $confdir/modules/site/templates/sysidcfg.erb
|
348
350
|
system_locale=en_US
|
349
351
|
timezone=GMT
|
350
352
|
terminal=xterms
|
@@ -362,20 +364,20 @@ Puppet::Type.newtype(:zone) do
|
|
362
364
|
And then call that:
|
363
365
|
|
364
366
|
zone { myzone:
|
365
|
-
ip
|
366
|
-
sysidcfg
|
367
|
-
path
|
367
|
+
ip => "bge0:192.168.0.23",
|
368
|
+
sysidcfg => template("site/sysidcfg.erb"),
|
369
|
+
path => "/opt/zones/myzone",
|
368
370
|
realhostname => "fully.qualified.domain.name"
|
369
371
|
}
|
370
372
|
|
371
|
-
The sysidcfg only matters on the first booting of the zone,
|
373
|
+
The `sysidcfg` only matters on the first booting of the zone,
|
372
374
|
so Puppet only checks for it at that time.}
|
373
375
|
end
|
374
376
|
|
375
377
|
newparam(:path) do
|
376
378
|
desc "The root of the zone's filesystem. Must be a fully qualified
|
377
|
-
file name. If you include
|
378
|
-
replaced with the zone's name.
|
379
|
+
file name. If you include `%s` in the path, then it will be
|
380
|
+
replaced with the zone's name. Currently, you cannot use
|
379
381
|
Puppet to move a zone."
|
380
382
|
|
381
383
|
validate do |value|
|
@@ -394,11 +396,11 @@ Puppet::Type.newtype(:zone) do
|
|
394
396
|
end
|
395
397
|
|
396
398
|
newparam(:create_args) do
|
397
|
-
desc "Arguments to the zonecfg create command. This can be used to create branded zones."
|
399
|
+
desc "Arguments to the `zonecfg` create command. This can be used to create branded zones."
|
398
400
|
end
|
399
401
|
|
400
402
|
newparam(:install_args) do
|
401
|
-
desc "Arguments to the zoneadm install command. This can be used to create branded zones."
|
403
|
+
desc "Arguments to the `zoneadm` install command. This can be used to create branded zones."
|
402
404
|
end
|
403
405
|
|
404
406
|
newparam(:realhostname) do
|