]> WPIA git - infra.git/blobdiff - environments/production/manifests/quiz.pp
chg: deb signing key moved
[infra.git] / environments / production / manifests / quiz.pp
index f57615863686c078f65f2037a26ed0fdfaaab851..240d99810f3c1757b6a77fa0781503c9a6b781bf 100644 (file)
@@ -1,6 +1,6 @@
 define teracara_quiz (){
   apt_key{ 'E643C483A426BB5311D26520A631B6AF9FD3DF94':
-    source => 'http://deb.dogcraft.de/signer.gpg',
+    source => 'http://deb2.dogcraft.de/signer.gpg',
     ensure => 'present'
   } ->
   file { '/etc/apt/sources.list.d/dogcraft.list':
@@ -43,13 +43,19 @@ 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']
   }
+  package{'php-pgsql':
+    ensure => 'installed',
+    before => File['/etc/apache2/sites-available/000-default.conf'],
+    notify => Service['apache2'],
+  }
   file {'/etc/apache2/sites-available/000-default.conf':
       require => Package['apache2'],
       ensure => 'file',