Puppet Class: pgbackrest::config
- Defined in:
- manifests/config.pp
Summary
Configures pgBackRestOverview
Configures pgBackRest
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'manifests/config.pp', line 8
class pgbackrest::config(
String $filename = '/etc/pgbackrest.conf',
Boolean $show_diff = true,
) {
# Add each section block configs
$pgbackrest::config.each |String $section, Hash $settings| {
$settings.each |String $name, String $value| {
# Remove values not defined or empty
$is_present = $value ? {
undef => 'absent',
'' => 'absent',
default => 'present',
}
# Write the configuration options to pgbackrest::config::filename
ini_setting { "${section} ${name}":
ensure => $is_present,
path => $filename,
section => $section,
setting => $name,
value => $value,
show_diff => $show_diff,
}
}
}
}
|