Skip to content

Commit

Permalink
Outsource 'icinga_unittest' database creation into pgsql::database::c…
Browse files Browse the repository at this point in the history
…reate

refs #6842
  • Loading branch information
Al2Klimov committed Aug 5, 2014
1 parent ccbc1f5 commit 9a50cb8
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions .vagrant-puppet/manifests/default.pp
Expand Up @@ -489,12 +489,9 @@
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':
Expand Down

0 comments on commit 9a50cb8

Please sign in to comment.