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