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
@@ -6,8 +6,11 @@ Puppet::Type.newtype(:selmodule) do
|
|
6
6
|
@doc = "Manages loading and unloading of SELinux policy modules
|
7
7
|
on the system. Requires SELinux support. See man semodule(8)
|
8
8
|
for more information on SELinux policy modules.
|
9
|
-
|
10
|
-
**Autorequires:** If Puppet is managing the file containing this SELinux
|
9
|
+
|
10
|
+
**Autorequires:** If Puppet is managing the file containing this SELinux
|
11
|
+
policy module (which is either explicitly specified in the `selmodulepath`
|
12
|
+
attribute or will be found at {`selmoduledir`}/{`name`}.pp), the selmodule
|
13
|
+
resource will autorequire that file."
|
11
14
|
|
12
15
|
ensurable
|
13
16
|
|
@@ -20,9 +23,10 @@ Puppet::Type.newtype(:selmodule) do
|
|
20
23
|
newparam(:selmoduledir) do
|
21
24
|
|
22
25
|
desc "The directory to look for the compiled pp module file in.
|
23
|
-
Currently defaults to `/usr/share/selinux/targeted`. If
|
24
|
-
is not specified
|
25
|
-
|
26
|
+
Currently defaults to `/usr/share/selinux/targeted`. If the
|
27
|
+
`selmodulepath` attribute is not specified, Puppet will expect to find
|
28
|
+
the module in `<selmoduledir>/<name>.pp`, where `name` is the value of the
|
29
|
+
`name` parameter."
|
26
30
|
|
27
31
|
defaultto "/usr/share/selinux/targeted"
|
28
32
|
end
|
@@ -30,7 +34,7 @@ Puppet::Type.newtype(:selmodule) do
|
|
30
34
|
newparam(:selmodulepath) do
|
31
35
|
|
32
36
|
desc "The full path to the compiled .pp policy module. You only need to use
|
33
|
-
this if the module file is not in the directory
|
37
|
+
this if the module file is not in the `selmoduledir` directory."
|
34
38
|
|
35
39
|
end
|
36
40
|
|
data/lib/puppet/type/service.rb
CHANGED
@@ -20,10 +20,10 @@ module Puppet
|
|
20
20
|
|
21
21
|
Note that if a `service` receives an event from another resource,
|
22
22
|
the service will get restarted. The actual command to restart the
|
23
|
-
service depends on the platform. You can provide an explicit command
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
service depends on the platform. You can provide an explicit command for
|
24
|
+
restarting with the `restart` attribute, or you can set `hasrestart` to
|
25
|
+
true to use the init script's restart command; if you do neither, the
|
26
|
+
service's stop and start commands will be used."
|
27
27
|
|
28
28
|
feature :refreshable, "The provider can restart the service.",
|
29
29
|
:methods => [:restart]
|
@@ -143,10 +143,8 @@ module Puppet
|
|
143
143
|
status on those service whose init scripts do not include a status
|
144
144
|
command.
|
145
145
|
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
The pattern can be a simple string or any legal Ruby pattern."
|
146
|
+
Defaults to the name of the service. The pattern can be a simple string
|
147
|
+
or any legal Ruby pattern."
|
150
148
|
|
151
149
|
defaultto { @resource[:binary] || @resource[:name] }
|
152
150
|
end
|
@@ -164,7 +162,7 @@ module Puppet
|
|
164
162
|
return 0 if the service is running and a nonzero value otherwise.
|
165
163
|
Ideally, these return codes should conform to
|
166
164
|
[the LSB's specification for init script status actions](http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html),
|
167
|
-
but
|
165
|
+
but Puppet only considers the difference between 0 and nonzero
|
168
166
|
to be relevant.
|
169
167
|
|
170
168
|
If left unspecified, the status method will be determined
|
@@ -184,8 +182,10 @@ module Puppet
|
|
184
182
|
end
|
185
183
|
|
186
184
|
newparam :hasrestart do
|
187
|
-
desc "Specify that an init script has a `restart`
|
188
|
-
|
185
|
+
desc "Specify that an init script has a `restart` command. If this is
|
186
|
+
false and you do not specify a command in the `restart` attribute,
|
187
|
+
the init script's `stop` and `start` commands will be used. Defaults
|
188
|
+
to true; note that this is a change from earlier versions of Puppet."
|
189
189
|
newvalues(:true, :false)
|
190
190
|
end
|
191
191
|
|
@@ -2,8 +2,8 @@ module Puppet
|
|
2
2
|
newtype(:ssh_authorized_key) do
|
3
3
|
@doc = "Manages SSH authorized keys. Currently only type 2 keys are
|
4
4
|
supported.
|
5
|
-
|
6
|
-
**Autorequires:** If Puppet is managing the user account in which this
|
5
|
+
|
6
|
+
**Autorequires:** If Puppet is managing the user account in which this
|
7
7
|
SSH key should be installed, the `ssh_authorized_key` resource will autorequire
|
8
8
|
that user."
|
9
9
|
|
@@ -15,9 +15,6 @@ module Puppet
|
|
15
15
|
|
16
16
|
isnamevar
|
17
17
|
|
18
|
-
validate do |value|
|
19
|
-
raise Puppet::Error, "Resourcename must not contain whitespace: #{value}" if value =~ /\s/
|
20
|
-
end
|
21
18
|
end
|
22
19
|
|
23
20
|
newproperty(:type) do
|
data/lib/puppet/type/sshkey.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
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 `/etc/ssh/ssh_known_hosts`. See
|
4
|
+
only knows how to install keys into `/etc/ssh/ssh_known_hosts`. See
|
5
5
|
the `ssh_authorized_key` type to manage authorized keys."
|
6
6
|
|
7
7
|
ensurable
|
data/lib/puppet/type/stage.rb
CHANGED
data/lib/puppet/type/tidy.rb
CHANGED
@@ -43,17 +43,18 @@ Puppet::Type.newtype(:tidy) do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
newparam(:matches) do
|
46
|
-
desc
|
46
|
+
desc <<-EOT
|
47
|
+
One or more (shell type) file glob patterns, which restrict
|
47
48
|
the list of files to be tidied to those whose basenames match
|
48
49
|
at least one of the patterns specified. Multiple patterns can
|
49
50
|
be specified using an array.
|
50
51
|
|
51
52
|
Example:
|
52
53
|
|
53
|
-
tidy {
|
54
|
-
age
|
54
|
+
tidy { "/tmp":
|
55
|
+
age => "1w",
|
55
56
|
recurse => 1,
|
56
|
-
matches => [
|
57
|
+
matches => [ "[0-9]pub*.tmp", "*.temp", "tmpfile?" ]
|
57
58
|
}
|
58
59
|
|
59
60
|
This removes files from `/tmp` if they are one week old or older,
|
@@ -68,7 +69,8 @@ Puppet::Type.newtype(:tidy) do
|
|
68
69
|
for recurse if matches is used, as matches only apply to files found
|
69
70
|
by recursion (there's no reason to use static patterns match against
|
70
71
|
a statically determined path). Requiering explicit recursion clears
|
71
|
-
up a common source of confusion.
|
72
|
+
up a common source of confusion.
|
73
|
+
EOT
|
72
74
|
|
73
75
|
# Make sure we convert to an array.
|
74
76
|
munge do |value|
|
@@ -87,8 +89,8 @@ Puppet::Type.newtype(:tidy) do
|
|
87
89
|
|
88
90
|
newparam(:backup) do
|
89
91
|
desc "Whether tidied files should be backed up. Any values are passed
|
90
|
-
directly to the file resources used for actual file deletion, so
|
91
|
-
|
92
|
+
directly to the file resources used for actual file deletion, so consult
|
93
|
+
the `file` type's backup documentation to determine valid values."
|
92
94
|
end
|
93
95
|
|
94
96
|
newparam(:age) do
|
@@ -143,7 +145,7 @@ Puppet::Type.newtype(:tidy) do
|
|
143
145
|
the specified size. Unqualified values are in kilobytes, but
|
144
146
|
*b*, *k*, *m*, *g*, and *t* can be appended to specify *bytes*,
|
145
147
|
*kilobytes*, *megabytes*, *gigabytes*, and *terabytes*, respectively.
|
146
|
-
Only the first character is significant, so the full word can also
|
148
|
+
Only the first character is significant, so the full word can also
|
147
149
|
be used."
|
148
150
|
|
149
151
|
@@sizeconvertors = {
|
data/lib/puppet/type/user.rb
CHANGED
@@ -14,7 +14,10 @@ module Puppet
|
|
14
14
|
groups and generally uses POSIX APIs for retrieving information
|
15
15
|
about them. It does not directly modify `/etc/passwd` or anything.
|
16
16
|
|
17
|
-
**Autorequires:** If Puppet is managing the user's primary group (as
|
17
|
+
**Autorequires:** If Puppet is managing the user's primary group (as
|
18
|
+
provided in the `gid` attribute), the user resource will autorequire
|
19
|
+
that group. If Puppet is managing any role accounts corresponding to the
|
20
|
+
user's roles, the user resource will autorequire those role accounts."
|
18
21
|
|
19
22
|
feature :allows_duplicates,
|
20
23
|
"The provider supports duplicate users with the same UID."
|
@@ -86,17 +89,16 @@ module Puppet
|
|
86
89
|
end
|
87
90
|
|
88
91
|
newproperty(:uid) do
|
89
|
-
desc "The user ID
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
identifier (SID)."
|
92
|
+
desc "The user ID; must be specified numerically. If no user ID is
|
93
|
+
specified when creating a new user, then one will be chosen
|
94
|
+
automatically. This will likely result in the same user having
|
95
|
+
different UIDs on different systems, which is not recommended. This is
|
96
|
+
especially noteworthy when managing the same user on both Darwin and
|
97
|
+
other platforms, since Puppet does UID generation on Darwin, but
|
98
|
+
the underlying tools do so on other platforms.
|
99
|
+
|
100
|
+
On Windows, this property is read-only and will return the user's
|
101
|
+
security identifier (SID)."
|
100
102
|
|
101
103
|
munge do |value|
|
102
104
|
case value
|
@@ -149,7 +151,7 @@ module Puppet
|
|
149
151
|
end
|
150
152
|
|
151
153
|
newproperty(:comment) do
|
152
|
-
desc "A description of the user. Generally
|
154
|
+
desc "A description of the user. Generally the user's full name."
|
153
155
|
end
|
154
156
|
|
155
157
|
newproperty(:shell) do
|
@@ -158,7 +160,10 @@ module Puppet
|
|
158
160
|
end
|
159
161
|
|
160
162
|
newproperty(:password, :required_features => :manages_passwords) do
|
161
|
-
desc
|
163
|
+
desc %q{The user's password, in whatever encrypted format the local
|
164
|
+
machine requires. Be sure to enclose any value that includes a dollar
|
165
|
+
sign ($) in single quotes (') to avoid accidental variable
|
166
|
+
interpolation.}
|
162
167
|
|
163
168
|
validate do |value|
|
164
169
|
raise ArgumentError, "Passwords cannot include ':'" if value.is_a?(String) and value.include?(":")
|
@@ -182,7 +187,7 @@ module Puppet
|
|
182
187
|
end
|
183
188
|
|
184
189
|
newproperty(:password_min_age, :required_features => :manages_password_age) do
|
185
|
-
desc "The minimum
|
190
|
+
desc "The minimum number of days a password must be used before it may be changed."
|
186
191
|
|
187
192
|
munge do |value|
|
188
193
|
case value
|
@@ -195,13 +200,13 @@ module Puppet
|
|
195
200
|
|
196
201
|
validate do |value|
|
197
202
|
if value.to_s !~ /^-?\d+$/
|
198
|
-
raise ArgumentError, "Password minimum age must be provided as a number"
|
203
|
+
raise ArgumentError, "Password minimum age must be provided as a number."
|
199
204
|
end
|
200
205
|
end
|
201
206
|
end
|
202
207
|
|
203
208
|
newproperty(:password_max_age, :required_features => :manages_password_age) do
|
204
|
-
desc "The maximum
|
209
|
+
desc "The maximum number of days a password may be used before it must be changed."
|
205
210
|
|
206
211
|
munge do |value|
|
207
212
|
case value
|
@@ -214,35 +219,35 @@ module Puppet
|
|
214
219
|
|
215
220
|
validate do |value|
|
216
221
|
if value.to_s !~ /^-?\d+$/
|
217
|
-
raise ArgumentError, "Password maximum age must be provided as a number"
|
222
|
+
raise ArgumentError, "Password maximum age must be provided as a number."
|
218
223
|
end
|
219
224
|
end
|
220
225
|
end
|
221
226
|
|
222
227
|
newproperty(:groups, :parent => Puppet::Property::List) do
|
223
|
-
desc "The groups
|
224
|
-
|
225
|
-
specified as an array."
|
228
|
+
desc "The groups to which the user belongs. The primary group should
|
229
|
+
not be listed, and groups should be identified by name rather than by
|
230
|
+
GID. Multiple groups should be specified as an array."
|
226
231
|
|
227
232
|
validate do |value|
|
228
233
|
if value =~ /^\d+$/
|
229
|
-
raise ArgumentError, "Group names must be provided, not numbers"
|
234
|
+
raise ArgumentError, "Group names must be provided, not GID numbers."
|
230
235
|
end
|
231
|
-
raise ArgumentError, "Group names must be provided as an array, not a comma-separated list" if value.include?(",")
|
236
|
+
raise ArgumentError, "Group names must be provided as an array, not a comma-separated list." if value.include?(",")
|
232
237
|
end
|
233
238
|
end
|
234
239
|
|
235
240
|
newparam(:name) do
|
236
|
-
desc "
|
237
|
-
|
238
|
-
|
241
|
+
desc "The user name. While naming limitations vary by operating system,
|
242
|
+
it is advisable to restrict names to the lowest common denominator,
|
243
|
+
which is a maximum of 8 characters beginning with a letter."
|
239
244
|
isnamevar
|
240
245
|
end
|
241
246
|
|
242
247
|
newparam(:membership) do
|
243
|
-
desc "Whether specified groups should be
|
244
|
-
|
245
|
-
|
248
|
+
desc "Whether specified groups should be considered the **complete list**
|
249
|
+
(`inclusive`) or the **minimum list** (`minimum`) of groups to which
|
250
|
+
the user belongs. Defaults to `minimum`."
|
246
251
|
|
247
252
|
newvalues(:inclusive, :minimum)
|
248
253
|
|
@@ -250,7 +255,9 @@ module Puppet
|
|
250
255
|
end
|
251
256
|
|
252
257
|
newparam(:system, :boolean => true) do
|
253
|
-
desc "Whether the user is a system user
|
258
|
+
desc "Whether the user is a system user, according to the OS's criteria;
|
259
|
+
on most platforms, a UID less than or equal to 500 indicates a system
|
260
|
+
user. Defaults to `false`."
|
254
261
|
|
255
262
|
newvalues(:true, :false)
|
256
263
|
|
@@ -258,7 +265,7 @@ module Puppet
|
|
258
265
|
end
|
259
266
|
|
260
267
|
newparam(:allowdupe, :boolean => true) do
|
261
|
-
desc "Whether to allow duplicate UIDs."
|
268
|
+
desc "Whether to allow duplicate UIDs. Defaults to `false`."
|
262
269
|
|
263
270
|
newvalues(:true, :false)
|
264
271
|
|
@@ -266,7 +273,8 @@ module Puppet
|
|
266
273
|
end
|
267
274
|
|
268
275
|
newparam(:managehome, :boolean => true) do
|
269
|
-
desc "Whether to manage the home directory when managing the user.
|
276
|
+
desc "Whether to manage the home directory when managing the user.
|
277
|
+
Defaults to `false`."
|
270
278
|
|
271
279
|
newvalues(:true, :false)
|
272
280
|
|
@@ -281,7 +289,7 @@ module Puppet
|
|
281
289
|
|
282
290
|
newproperty(:expiry, :required_features => :manages_expiry) do
|
283
291
|
desc "The expiry date for this user. Must be provided in
|
284
|
-
a zero
|
292
|
+
a zero-padded YYYY-MM-DD format --- e.g. 2010-02-19."
|
285
293
|
|
286
294
|
validate do |value|
|
287
295
|
if value !~ /^\d{4}-\d{2}-\d{2}$/
|
@@ -373,9 +381,9 @@ module Puppet
|
|
373
381
|
end
|
374
382
|
|
375
383
|
newparam(:role_membership) do
|
376
|
-
desc "Whether specified roles should be
|
377
|
-
|
378
|
-
|
384
|
+
desc "Whether specified roles should be considered the **complete list**
|
385
|
+
(`inclusive`) or the **minimum list** (`minimum`) of roles the user
|
386
|
+
has. Defaults to `minimum`."
|
379
387
|
|
380
388
|
newvalues(:inclusive, :minimum)
|
381
389
|
|
@@ -399,9 +407,9 @@ module Puppet
|
|
399
407
|
end
|
400
408
|
|
401
409
|
newparam(:auth_membership) do
|
402
|
-
desc "Whether specified auths should be
|
403
|
-
|
404
|
-
|
410
|
+
desc "Whether specified auths should be considered the **complete list**
|
411
|
+
(`inclusive`) or the **minimum list** (`minimum`) of auths the user
|
412
|
+
has. Defaults to `minimum`."
|
405
413
|
|
406
414
|
newvalues(:inclusive, :minimum)
|
407
415
|
|
@@ -425,9 +433,9 @@ module Puppet
|
|
425
433
|
end
|
426
434
|
|
427
435
|
newparam(:profile_membership) do
|
428
|
-
desc "Whether specified roles should be treated as the
|
429
|
-
|
430
|
-
|
436
|
+
desc "Whether specified roles should be treated as the **complete list**
|
437
|
+
(`inclusive`) or the **minimum list** (`minimum`) of roles
|
438
|
+
of which the user is a member. Defaults to `minimum`."
|
431
439
|
|
432
440
|
newvalues(:inclusive, :minimum)
|
433
441
|
|
@@ -435,21 +443,21 @@ module Puppet
|
|
435
443
|
end
|
436
444
|
|
437
445
|
newproperty(:keys, :parent => Puppet::Property::KeyValue, :required_features => :manages_solaris_rbac) do
|
438
|
-
desc "Specify user attributes in an array of
|
446
|
+
desc "Specify user attributes in an array of key = value pairs."
|
439
447
|
|
440
448
|
def membership
|
441
449
|
:key_membership
|
442
450
|
end
|
443
451
|
|
444
452
|
validate do |value|
|
445
|
-
raise ArgumentError, "
|
453
|
+
raise ArgumentError, "Key/value pairs must be seperated by an =" unless value.include?("=")
|
446
454
|
end
|
447
455
|
end
|
448
456
|
|
449
457
|
newparam(:key_membership) do
|
450
|
-
desc "Whether specified key
|
451
|
-
|
452
|
-
|
458
|
+
desc "Whether specified key/value pairs should be considered the
|
459
|
+
**complete list** (`inclusive`) or the **minimum list** (`minimum`) of
|
460
|
+
the user's attributes. Defaults to `minimum`."
|
453
461
|
|
454
462
|
newvalues(:inclusive, :minimum)
|
455
463
|
|
@@ -457,15 +465,15 @@ module Puppet
|
|
457
465
|
end
|
458
466
|
|
459
467
|
newproperty(:project, :required_features => :manages_solaris_rbac) do
|
460
|
-
desc "The name of the project associated with a user"
|
468
|
+
desc "The name of the project associated with a user."
|
461
469
|
end
|
462
470
|
|
463
471
|
newparam(:ia_load_module, :required_features => :manages_aix_lam) do
|
464
|
-
desc "The name of the I&A module to use to manage this user"
|
472
|
+
desc "The name of the I&A module to use to manage this user."
|
465
473
|
end
|
466
474
|
|
467
475
|
newproperty(:attributes, :parent => Puppet::Property::KeyValue, :required_features => :manages_aix_lam) do
|
468
|
-
desc "Specify
|
476
|
+
desc "Specify AIX attributes for the user in an array of attribute = value pairs."
|
469
477
|
|
470
478
|
def membership
|
471
479
|
:attribute_membership
|
@@ -481,9 +489,9 @@ module Puppet
|
|
481
489
|
end
|
482
490
|
|
483
491
|
newparam(:attribute_membership) do
|
484
|
-
desc "Whether specified attribute value pairs should be treated as the
|
485
|
-
|
486
|
-
|
492
|
+
desc "Whether specified attribute value pairs should be treated as the
|
493
|
+
**complete list** (`inclusive`) or the **minimum list** (`minimum`) of
|
494
|
+
attribute/value pairs for the user. Defaults to `minimum`."
|
487
495
|
|
488
496
|
newvalues(:inclusive, :minimum)
|
489
497
|
|
data/lib/puppet/type/vlan.rb
CHANGED
@@ -3,24 +3,24 @@
|
|
3
3
|
#
|
4
4
|
|
5
5
|
Puppet::Type.newtype(:vlan) do
|
6
|
-
@doc = "
|
6
|
+
@doc = "Manages a VLAN on a router or switch."
|
7
7
|
|
8
8
|
apply_to_device
|
9
9
|
|
10
10
|
ensurable
|
11
11
|
|
12
12
|
newparam(:name) do
|
13
|
-
desc "
|
13
|
+
desc "The numeric VLAN ID."
|
14
14
|
isnamevar
|
15
15
|
|
16
16
|
newvalues(/^\d+/)
|
17
17
|
end
|
18
18
|
|
19
19
|
newproperty(:description) do
|
20
|
-
desc "
|
20
|
+
desc "The VLAN's name."
|
21
21
|
end
|
22
22
|
|
23
23
|
newparam(:device_url) do
|
24
|
-
desc "
|
24
|
+
desc "The URL of the router or switch maintaining this VLAN."
|
25
25
|
end
|
26
26
|
end
|