Replace the hard-coded path for the SQL schema file with the variable from params.pp.

This commit is contained in:
Nick Chappell 2014-07-02 21:54:19 -07:00
parent 4fa10d3d32
commit 87318a1722

View file

@ -108,7 +108,7 @@ class icinga2::server::install::execs inherits icinga2::server {
exec { 'postgres_schema_load':
user => 'root',
path => '/usr/bin:/usr/sbin:/bin/:/sbin',
command => "su postgres -c 'psql -d ${db_name} < /usr/share/icinga2-ido-pgsql/schema/pgsql.sql'; touch /etc/icinga2/postgres_schema_loaded.txt",
command => "su postgres -c 'psql -d ${db_name} < ${server_db_schema_path}'; touch /etc/icinga2/postgres_schema_loaded.txt",
creates => "/etc/icinga2/postgres_schema_loaded.txt",
require => Class['icinga2::server::install::packages'],
}