Puppet Class: sendmail::virtusertable
- Defined in:
- manifests/virtusertable.pp
Summary
Manage the Sendmail virtusertable db file.Overview
The class manages the file either as a single file resource or each entry in the file separately. The file is managed as a whole using the ‘source` or `content` parameters. The `entries` parameter is used to manage each entry separately. Preferable this is done with hiera using automatic parameter lookup.
| 41 42 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 | # File 'manifests/virtusertable.pp', line 41
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,
      }
    }
  }
} |