Project

General

Profile

« Previous | Next » 

Revision b9371650

Added by Ewoud Kohl van Wijngaarden almost 6 years ago

Fixes #22940 - Ensure the PG root cert is installed

When a remote database is used the postgres server is not managed. This
meant that the certificate was not placed. It's moved to the config
since it's a client config that always needs to happen.

View differences:

manifests/database/postgresql.pp
default => postgresql_password($::foreman::db_username, $::foreman::db_password),
}
if $::foreman::db_root_cert {
$pg_cert_dir = "${::foreman::app_root}/.postgresql"
file { $pg_cert_dir:
ensure => 'directory',
owner => 'root',
group => $::foreman::group,
mode => '0640',
}
file { "${pg_cert_dir}/root.crt":
ensure => file,
source => $::foreman::db_root_cert,
owner => 'root',
group => $::foreman::group,
mode => '0640',
}
}
# Prevents errors if run from /root etc.
Postgresql_psql {
cwd => '/',

Also available in: Unified diff