Defined Type: postfix::lookup::pgsql
- Defined in:
- vendor_modules/postfix/manifests/lookup/pgsql.pp
Overview
Define a PostgreSQL lookup table.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'vendor_modules/postfix/manifests/lookup/pgsql.pp', line 17
define postfix::lookup::pgsql (
Array[Postfix::Type::Lookup::PgSQL::Host, 1] $hosts,
String $user,
String $password,
String $dbname,
String $query,
Enum['present', 'absent'] $ensure = 'present',
Stdlib::Absolutepath $path = $title,
Optional[String] $result_format = undef,
Optional[Array[String, 1]] $domain = undef,
Optional[Integer[0]] $expansion_limit = undef,
) {
include postfix
$_hosts = postfix::flatten_hosts($hosts)
$_ensure = $ensure ? {
'absent' => 'absent',
default => 'file',
}
file { $path:
ensure => $_ensure,
owner => 0,
group => 0,
mode => '0600',
content => template("${module_name}/pgsql.cf.erb"),
}
if $ensure != 'absent' and has_key($postfix::lookup_packages, 'pgsql') {
$pgsql_package = $postfix::lookup_packages['pgsql']
ensure_packages([$pgsql_package])
Package[$pgsql_package] -> File[$path]
}
}
|