mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 17:24:16 +02:00
Outsource 'icinga_unittest' database creation into pgsql::database::create
refs #6842
This commit is contained in:
parent
ccbc1f5aa0
commit
9a50cb8fa3
@ -489,12 +489,9 @@ exec { 'create-mysql-icinga_unittest-db':
|
||||
require => Service['mysqld']
|
||||
}
|
||||
|
||||
exec{ 'create-pgsql-icinga_unittest-db':
|
||||
unless => 'sudo -u postgres psql -tAc "SELECT 1 FROM pg_roles WHERE rolname=\'icinga_unittest\'" | grep -q 1',
|
||||
command => 'sudo -u postgres psql -c "CREATE ROLE icinga_unittest WITH LOGIN PASSWORD \'icinga_unittest\';" && \
|
||||
sudo -u postgres createdb -O icinga_unittest -E UTF8 -T template0 icinga_unittest && \
|
||||
sudo -u postgres createlang plpgsql icinga_unittest',
|
||||
require => Service['postgresql']
|
||||
pgsql::database::create { 'icinga_unittest':
|
||||
username => 'icinga_unittest',
|
||||
password => 'icinga_unittest',
|
||||
}
|
||||
|
||||
exec { 'install php-ZendFramework-Db-Adapter-Pdo-Pgsql':
|
||||
|
Loading…
x
Reference in New Issue
Block a user