Alexandros Kosiaris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311962

Change subject: puppetdb: Have postgres users deployed on slave as well
......................................................................

puppetdb: Have postgres users deployed on slave as well

Change-Id: Iefd3670b6484b5fb08c32f1ab2a29108ea2c27af
---
M modules/puppetmaster/manifests/puppetdb/database.pp
1 file changed, 15 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/62/311962/1

diff --git a/modules/puppetmaster/manifests/puppetdb/database.pp 
b/modules/puppetmaster/manifests/puppetdb/database.pp
index ccc7a24..2f6264b 100644
--- a/modules/puppetmaster/manifests/puppetdb/database.pp
+++ b/modules/puppetmaster/manifests/puppetdb/database.pp
@@ -13,21 +13,6 @@
             root_dir => '/srv/postgres',
             use_ssl  => true,
         }
-        # Postgres replication and users
-        $postgres_users = hiera('puppetmaster::puppetdb::postgres_users', 
undef)
-        if $postgres_users {
-            create_resources(postgresql::user, $postgres_users)
-        }
-        # Create the puppetdb user for localhost
-        # This works on every server and is used for read-only db lookups
-        postgresql::user { 'puppetdb@localhost':
-            ensure    => present,
-            user      => 'puppetdb',
-            database  => 'puppetdb',
-            password  => $puppetdb_pass,
-            cidr      => "${::main_ipaddress}/32",
-            pgversion => '9.4',
-        }
     } else {
         $require_class = 'postgresql::slave'
         class { 'postgresql::slave':
@@ -38,8 +23,21 @@
             use_ssl          => true,
         }
     }
-
-
+    # Postgres replication and users
+    $postgres_users = hiera('puppetmaster::puppetdb::postgres_users', undef)
+    if $postgres_users {
+        create_resources(postgresql::user, $postgres_users)
+    }
+    # Create the puppetdb user for localhost
+    # This works on every server and is used for read-only db lookups
+    postgresql::user { 'puppetdb@localhost':
+        ensure    => present,
+        user      => 'puppetdb',
+        database  => 'puppetdb',
+        password  => $puppetdb_pass,
+        cidr      => "${::main_ipaddress}/32",
+        pgversion => '9.4',
+    }
 
     # Create the database
     postgresql::db { 'puppetdb':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefd3670b6484b5fb08c32f1ab2a29108ea2c27af
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris <akosia...@wikimedia.org>

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

Reply via email to