summaryrefslogtreecommitdiff
path: root/puppet
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2013-11-25 12:16:04 -0500
committerMicah Anderson <micah@leap.se>2013-11-27 13:57:05 -0500
commitab278941346cc868aad7a3900a2cd5a1007986ea (patch)
tree5d4bfb90aeea0d3a0816b3b474af6b0fa51a1dca /puppet
parentfee571ccc4cd0cf8c665cf7446a0bb99c6dd30cf (diff)
make some more dependency chains explicit
Change-Id: Ib9525c3a933041fa9b378e1869c0a866375bb509
Diffstat (limited to 'puppet')
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp27
1 files changed, 15 insertions, 12 deletions
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index 684d3ab7..dcf7f48a 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -34,9 +34,11 @@ class site_couchdb {
class { 'couchdb::bigcouch::package::cloudant': }
Class['site_config::default']
- -> Class ['couchdb::bigcouch::package::cloudant']
- -> Service ['couchdb']
- -> Class ['site_couchdb::bigcouch::add_nodes']
+ -> Class['couchdb::bigcouch::package::cloudant']
+ -> Service['couchdb']
+ -> Class['site_couchdb::stunnel']
+ -> File['/root/.netrc']
+ -> Class['site_couchdb::bigcouch::add_nodes']
-> Couchdb::Create_db['users']
-> Couchdb::Create_db['tokens']
-> Couchdb::Add_user[$couchdb_webapp_user]
@@ -46,11 +48,21 @@ class site_couchdb {
class { 'site_couchdb::bigcouch::add_nodes': }
+ # /etc/couchdb/couchdb.netrc is deployed by couchdb::query::setup
+ # we symlink this to /root/.netrc for couchdb_scripts (eg. backup)
+ # and makes life easier for the admin (i.e. using curl/wget without
+ # passing credentials)
couchdb::query::setup { 'localhost':
user => $couchdb_admin_user,
pw => $couchdb_admin_pw,
}
+ file { '/root/.netrc':
+ ensure => link,
+ target => '/etc/couchdb/couchdb.netrc',
+ require => Couchdb::Query::Setup['localhost']
+ }
+
# Populate couchdb
couchdb::add_user { $couchdb_webapp_user:
roles => '["auth"]',
@@ -99,15 +111,6 @@ class site_couchdb {
include site_shorewall::couchdb
include site_shorewall::couchdb::bigcouch
- # /etc/couchdb/couchdb.netrc is deployed by the couchdb module
- # needed for couchdb_scripts (backup) and makes life easier
- # for the admin (i.e. using curl/wget without passing credentials)
-
- file { '/root/.netrc':
- ensure => link,
- target => '/etc/couchdb/couchdb.netrc'
- }
-
file { '/srv/leap/couchdb':
ensure => directory
}