X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=environments%2Fproduction%2Fmanifests%2Fquiz.pp;h=240d99810f3c1757b6a77fa0781503c9a6b781bf;hb=95266f6237df2334741f3ce60050618259452ed4;hp=f57615863686c078f65f2037a26ed0fdfaaab851;hpb=4ac24a174e51d519f5d49690b48e503caf0080e5;p=infra.git diff --git a/environments/production/manifests/quiz.pp b/environments/production/manifests/quiz.pp index f576158..240d998 100644 --- a/environments/production/manifests/quiz.pp +++ b/environments/production/manifests/quiz.pp @@ -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',