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']
|
require => Service['mysqld']
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'create-pgsql-icingaweb-db':
|
pgsql::database::create { 'icingaweb':
|
||||||
unless => 'sudo -u postgres psql -tAc "SELECT 1 FROM pg_roles WHERE rolname=\'icingaweb\'" | grep -q 1',
|
username => 'icingaweb',
|
||||||
command => 'sudo -u postgres psql -c "CREATE ROLE icingaweb WITH LOGIN PASSWORD \'icinga\';" && \
|
password => 'icinga',
|
||||||
sudo -u postgres createdb -O icingaweb -E UTF8 -T template0 icingaweb && \
|
|
||||||
sudo -u postgres createlang plpgsql icingaweb',
|
|
||||||
require => Service['postgresql']
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { 'populate-icingaweb-mysql-db-accounts':
|
exec { 'populate-icingaweb-mysql-db-accounts':
|
||||||
|
|
Loading…
Reference in New Issue