From 9aa06a43fdc2a4eee50556e46b40d5003eb25925 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 13 Aug 2013 22:21:44 -0400 Subject: require that the couchdb::query::setup has been run before any attempts are made to create databases or add users as these would fail otherwise. Closes: #3466 Change-Id: Ifa8b3da5858ce858fd319c4a659e70d20a65d3e0 --- puppet/modules/site_couchdb/manifests/init.pp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'puppet/modules/site_couchdb/manifests/init.pp') diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp index 802f3224..75ed87a0 100644 --- a/puppet/modules/site_couchdb/manifests/init.pp +++ b/puppet/modules/site_couchdb/manifests/init.pp @@ -59,23 +59,27 @@ class site_couchdb { # Populate couchdb couchdb::add_user { $couchdb_webapp_user: - roles => '["auth"]', - pw => $couchdb_webapp_pw, - salt => $couchdb_webapp_salt + roles => '["auth"]', + pw => $couchdb_webapp_pw, + salt => $couchdb_webapp_salt, + require => Couchdb::Query::Setup['localhost'] } couchdb::add_user { $couchdb_soledad_user: roles => '["auth"]', pw => $couchdb_soledad_pw, - salt => $couchdb_soledad_salt + salt => $couchdb_soledad_salt, + require => Couchdb::Query::Setup['localhost'] } couchdb::create_db { 'users': - readers => "{ \"names\": [\"$couchdb_webapp_user\"], \"roles\": [] }" + readers => "{ \"names\": [\"$couchdb_webapp_user\"], \"roles\": [] }", + require => Couchdb::Query::Setup['localhost'] } couchdb::create_db { 'tokens': - readers => "{ \"names\": [], \"roles\": [\"auth\"] }" + readers => "{ \"names\": [], \"roles\": [\"auth\"] }", + require => Couchdb::Query::Setup['localhost'] } include site_shorewall::couchdb -- cgit v1.2.3