Defined Type: postfix::hash
- Defined in:
- manifests/hash.pp
Summary
Creates Postfix hashed "map" files, and builds the corresponding db fileOverview
Creates Postfix hashed “map” files. It will create “$name”, and then build “$name.<table type suffix>” using the “postmap” command. The map file can then be referred to using postfix::config.
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 71 |
# File 'manifests/hash.pp', line 45
define postfix::hash (
Enum['present', 'absent'] $ensure = 'present',
Variant[Array[String], String, Undef] $source = undef,
Optional[Variant[Sensitive[String],String]] $content = undef,
Stdlib::Filemode $mode = '0640',
) {
include postfix::params
assert_type(Stdlib::Absolutepath, $name)
if (!defined(Class['postfix'])) {
fail 'You must define class postfix before using postfix::config!'
}
if $source and $content {
fail 'You must provide either \'source\' or \'content\', not both'
}
postfix::map { $name:
ensure => $ensure,
source => $source,
content => $content,
type => $postfix::lookup_table_type,
path => $name,
mode => $mode,
}
}
|