From 92d68c912d0de44ec9e88f7327303cc0fce7114b Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Tue, 26 Nov 2013 16:25:14 -0500 Subject: break out the database creation, user creation and design document loading into different classes Change-Id: Idd126d69e1fbe9c9794ad50337307dcc5dd635f4 --- .../modules/site_couchdb/manifests/create_dbs.pp | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 puppet/modules/site_couchdb/manifests/create_dbs.pp (limited to 'puppet/modules/site_couchdb/manifests/create_dbs.pp') diff --git a/puppet/modules/site_couchdb/manifests/create_dbs.pp b/puppet/modules/site_couchdb/manifests/create_dbs.pp new file mode 100644 index 00000000..2dca51c1 --- /dev/null +++ b/puppet/modules/site_couchdb/manifests/create_dbs.pp @@ -0,0 +1,31 @@ +class site_couchdb::create_dbs { + + couchdb::create_db { 'users': + members => "{ \"names\": [\"$site_couchdb::couchdb_webapp_user\"], \"roles\": [] }", + require => Couchdb::Query::Setup['localhost'] + } + + couchdb::create_db { 'tokens': + members => "{ \"names\": [], \"roles\": [\"auth\"] }", + require => Couchdb::Query::Setup['localhost'] + } + + couchdb::create_db { 'sessions': + members => "{ \"names\": [\"$site_couchdb::couchdb_webapp_user\"], \"roles\": [] }", + require => Couchdb::Query::Setup['localhost'] + } + + couchdb::create_db { 'tickets': + members => "{ \"names\": [\"$site_couchdb::couchdb_webapp_user\"], \"roles\": [] }", + require => Couchdb::Query::Setup['localhost'] + } + + # leap_mx will want access to this. Granting access to the soledad user + # via the auth group for now. + # leap_mx could use that for a start. + couchdb::create_db { 'identities': + members => "{ \"names\": [], \"roles\": [\"auth\"] }", + require => Couchdb::Query::Setup['localhost'] + } + +} -- cgit v1.2.3