Defined Type: postgresql::hba
- Defined in:
- manifests/hba.pp
Overview
This define APPENDS a line entry to the pg_hba.conf file
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'manifests/hba.pp', line 3
define postgresql::hba (
$type,
$database,
$user,
$method,
$ensure = 'present',
$order = '50',
$address = false,
$option = '' ) {
include postgresql::hbaconcat
$content = $type ? {
'local' => "${type} ${database} ${user} ${method} ${option}\n",
default => "${type} ${database} ${user} ${address} ${method} ${option}\n",
}
concat::fragment { "hba_fragment_${name}":
ensure => $ensure,
target => $postgresql::real_config_file_hba,
content => $content,
order => $order,
notify => $postgresql::manage_service_autorestart,
}
}
|