Alexandros Kosiaris has submitted this change and it was merged.

Change subject: postgres: Have postgres::db require the server class
......................................................................


postgres: Have postgres::db require the server class

That way the slave class will be able to run and do the mirroring dance

Change-Id: I61640a27c9b2f7bc631df75c96f7922662325316
---
M modules/puppetmaster/manifests/puppetdb/database.pp
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/puppetmaster/manifests/puppetdb/database.pp 
b/modules/puppetmaster/manifests/puppetdb/database.pp
index 27d3e53..ccc7a24 100644
--- a/modules/puppetmaster/manifests/puppetdb/database.pp
+++ b/modules/puppetmaster/manifests/puppetdb/database.pp
@@ -6,6 +6,8 @@
     $puppetdb_pass = hiera('puppetdb::password::rw')
 
     if $master == $::fqdn {
+        # We do this for the require in postgres::db
+        $require_class = 'postgresql::master'
         class { 'postgresql::master':
             includes => ['tuning.conf'],
             root_dir => '/srv/postgres',
@@ -27,6 +29,7 @@
             pgversion => '9.4',
         }
     } else {
+        $require_class = 'postgresql::slave'
         class { 'postgresql::slave':
             includes         => ['tuning.conf'],
             master_server    => $master,
@@ -40,7 +43,8 @@
 
     # Create the database
     postgresql::db { 'puppetdb':
-        owner => 'puppetdb',
+        owner   => 'puppetdb',
+        require => Class[$require_class],
     }
 
     exec { 'create_tgrm_extension':

-- 
To view, visit https://gerrit.wikimedia.org/r/310770
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I61640a27c9b2f7bc631df75c96f7922662325316
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to