From f73c3d220769faf4dce5e8582fe8cd655f50c996 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 4 Mar 2016 13:59:13 -0800 Subject: only not create soledad admin .netrc file if soledad is enabled --- puppet/modules/site_couchdb/manifests/setup.pp | 14 ++++++++------ 1 file 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 -- cgit v1.2.3