summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-04 13:59:13 -0800
committerelijah <elijah@riseup.net>2016-03-04 13:59:13 -0800
commitf73c3d220769faf4dce5e8582fe8cd655f50c996 (patch)
treef931f30778c05afd7bdb37813f17458d0a7f3bee /puppet/modules/site_couchdb
parentab63bc798a8012e8cff0732201d59e3356754d36 (diff)
only not create soledad admin .netrc file if soledad is enabled
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/manifests/setup.pp14
1 files changed, 8 insertions, 6 deletions
diff --git a/puppet/modules/site_couchdb/manifests/setup.pp b/puppet/modules/site_couchdb/manifests/setup.pp
index fef48505..710d3c1c 100644
--- a/puppet/modules/site_couchdb/manifests/setup.pp
+++ b/puppet/modules/site_couchdb/manifests/setup.pp
@@ -34,12 +34,14 @@ class site_couchdb::setup {
# setup /etc/couchdb/couchdb-soledad-admin.netrc file for couchdb admin
# access, accessible only for the soledad-admin user to create soledad
# userdbs
- file { '/etc/couchdb/couchdb-soledad-admin.netrc':
- content => "machine localhost login ${user} password ${site_couchdb::couchdb_admin_pw}",
- mode => '0400',
- owner => 'soledad-admin',
- group => 'root',
- require => [ Package['couchdb'], User['soledad-admin'] ];
+ if member(hiera('services', []), 'soledad') {
+ file { '/etc/couchdb/couchdb-soledad-admin.netrc':
+ content => "machine localhost login ${user} password ${site_couchdb::couchdb_admin_pw}",
+ mode => '0400',
+ owner => 'soledad-admin',
+ group => 'root',
+ require => [ Package['couchdb'], User['soledad-admin'] ];
+ }
}
# Checkout couchdb_scripts repo