summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/manifests/add_users.pp16
1 files changed, 10 insertions, 6 deletions
diff --git a/puppet/modules/site_couchdb/manifests/add_users.pp b/puppet/modules/site_couchdb/manifests/add_users.pp
index f12c5a5e..5c32c1e3 100644
--- a/puppet/modules/site_couchdb/manifests/add_users.pp
+++ b/puppet/modules/site_couchdb/manifests/add_users.pp
@@ -1,6 +1,8 @@
# add couchdb users for all services
class site_couchdb::add_users {
+ $services = hiera('services', [])
+
Class['site_couchdb::create_dbs']
-> Class['site_couchdb::add_users']
@@ -29,12 +31,14 @@ class site_couchdb::add_users {
## soledad couchdb user
## r/w: user-<uuid>, shared
## read: tokens
- couchdb::add_user { $site_couchdb::couchdb_soledad_user:
- roles => '["tokens"]',
- pw => $site_couchdb::couchdb_soledad_pw,
- salt => $site_couchdb::couchdb_soledad_salt,
- require => Couchdb::Query::Setup['localhost'],
- notify => Service['soledad-server'];
+ if member($services, 'soledad') {
+ couchdb::add_user { $site_couchdb::couchdb_soledad_user:
+ roles => '["tokens"]',
+ pw => $site_couchdb::couchdb_soledad_pw,
+ salt => $site_couchdb::couchdb_soledad_salt,
+ require => Couchdb::Query::Setup['localhost'],
+ notify => Service['soledad-server'];
+ }
}
## webapp couchdb user