2025-12-04 19:49:59 +01:00
|
|
|
## confdroid_postgresql::server::initdb.pp
|
|
|
|
|
# Module name: confdroid_postgresql
|
2025-12-05 13:06:10 +01:00
|
|
|
# Author: Arne Teuke (12ww1160@confdroid.com)
|
2025-04-18 22:57:13 +02:00
|
|
|
# @summary Class initiates the database
|
|
|
|
|
###############################################################################
|
2025-12-04 19:49:59 +01:00
|
|
|
class confdroid_postgresql::server::initdb (
|
2025-04-18 22:57:13 +02:00
|
|
|
|
2025-12-04 19:49:59 +01:00
|
|
|
) inherits confdroid_postgresql::params {
|
2025-04-18 22:57:13 +02:00
|
|
|
if $fqdn == $pl_server_fqdn {
|
2025-12-04 19:49:59 +01:00
|
|
|
require confdroid_postgresql::main::install
|
2025-09-28 14:12:41 +02:00
|
|
|
|
2025-04-18 22:57:13 +02:00
|
|
|
exec { 'init_pgsql_db':
|
|
|
|
|
command => 'postgresql-setup --initdb',
|
|
|
|
|
creates => "${pl_data_dir}/PG_VERSION",
|
|
|
|
|
path => ['/sbin','/usr/bin'],
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-04-19 00:45:39 +02:00
|
|
|
|
2025-12-04 19:49:59 +01:00
|
|
|
include confdroid_postgresql::main::files
|
2025-04-18 22:57:13 +02:00
|
|
|
}
|