From ab278941346cc868aad7a3900a2cd5a1007986ea Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Mon, 25 Nov 2013 12:16:04 -0500 Subject: make some more dependency chains explicit Change-Id: Ib9525c3a933041fa9b378e1869c0a866375bb509 --- puppet/modules/site_couchdb/manifests/init.pp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'puppet/modules/site_couchdb') 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 } -- cgit v1.2.3