]> WPIA git - infra.git/commitdiff
fix: ensure postgres-client for quiz-setup
authorFelix Dörre <felix@dogcraft.de>
Thu, 14 Dec 2017 21:31:59 +0000 (22:31 +0100)
committerFelix Dörre <felix@dogcraft.de>
Thu, 14 Dec 2017 21:32:10 +0000 (22:32 +0100)
Change-Id: I32d60ee3a55c98fa2ef6ad0e12037052a9f5949e

environments/production/manifests/quiz.pp

index f57615863686c078f65f2037a26ed0fdfaaab851..5d5e3a0804f4fd21da29c4d6ba22d1808b4539b3 100644 (file)
@@ -43,11 +43,12 @@ define teracara_quiz (){
       source => ['puppet:///modules/nre/config/ca/root.crt'],
       show_diff => 'no'
   }
+  include postgresql::client
   exec { 'import quiz schema':
     command => "/usr/bin/psql -U quiz -h ${ips[postgres]} < /usr/share/teracara-quiz/sql/db_postgresql.sql",
     environment => ["PGPASSWORD=${passwords[postgres][quiz]}"],
     unless  => "/usr/bin/psql -U quiz -h ${ips[postgres]} -tc \"select * from pg_tables where schemaname='public';\" | /bin/grep -q '.'",
-    require => [Package['teracara-quiz']],
+    require => [Package['teracara-quiz'], Class['postgresql::client']],
     before => File['/etc/apache2/sites-available/000-default.conf']
   }
   file {'/etc/apache2/sites-available/000-default.conf':