X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=environments%2Fproduction%2Fmanifests%2Fpostgres-primary.pp;h=076c4a8323405c4d1665b65c6ae4888adb5bce0f;hb=4ac24a174e51d519f5d49690b48e503caf0080e5;hp=e90109fd9610458fde006a763dc9e947255b49c1;hpb=417ce970216bcb6221d2e7335e89c65083cdecc5;p=infra.git diff --git a/environments/production/manifests/postgres-primary.pp b/environments/production/manifests/postgres-primary.pp index e90109f..076c4a8 100644 --- a/environments/production/manifests/postgres-primary.pp +++ b/environments/production/manifests/postgres-primary.pp @@ -28,4 +28,19 @@ node postgres-primary { address => "$gigi_ip/32", auth_method => 'md5', } + + postgresql::server::db { 'quiz': + require => Class['postgresql::server'], + user => 'quiz', + password => postgresql_password('quiz', $passwords[postgres][quiz]), + } + postgresql::server::pg_hba_rule { 'allow quiz to access its database': + require => Package['postgresql'], + description => "Open up PostgreSQL for access from quiz to its database", + type => 'host', + database => 'quiz', + user => 'quiz', + address => "${ips[quiz]}/32", + auth_method => 'md5', + } }