Puppet Class: sendmail::virtusertable
- Defined in:
- manifests/virtusertable.pp
Overview
Class: sendmail::virtusertable
Manage the Sendmail virtusertable db file.
Parameters:
- content
-
The desired contents of the virtusertable file. This allows managing the virtusertable file as a whole. Changes to the file automatically triggers a rebuild of the virtusertable database file. This attribute is mutually exclusive with ‘source’.
- source
-
A source file for the virtusertable file. This allows managing the virtusertable file as a whole. Changes to the file automatically triggers a rebuild of the virtusertable database file. This attribute is mutually exclusive with ‘content’.
- entries
-
A hash that will be used to create sendmail::virtusertable::entry resources. This class can be used to create virtusertable entries defined in hiera. The hiera hash should look like this:
sendmail::virtusertable::entries:
'info@example.com': value: 'fred' '@example.org': value: 'barney'
Requires:
Nothing.
Sample Usage:
class { 'sendmail::virtusertable': }
class { 'sendmail::virtusertable':
source => 'puppet:///modules/sendmail/virtusertable',
}
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'manifests/virtusertable.pp', line 43
class sendmail::virtusertable (
Optional[String] $content = undef,
Optional[String] $source = undef,
Hash[String,Data] $entries = {},
) {
if ($content and $source) {
fail('You cannot specify more than one of content, source, entries')
}
if ($content or $source) {
if !empty($entries) {
fail('You cannot specify more than one of content, source, entries')
}
class { 'sendmail::virtusertable::file':
content => $content,
source => $source,
}
}
elsif !empty($entries) {
$entries.each |$entry,$attributes| {
sendmail::virtusertable::entry { $entry:
* => $attributes,
}
}
}
}
|