summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/site_couchdb/manifests/init.pp')
-rw-r--r--puppet/modules/site_couchdb/manifests/init.pp16
1 files changed, 7 insertions, 9 deletions
diff --git a/puppet/modules/site_couchdb/manifests/init.pp b/puppet/modules/site_couchdb/manifests/init.pp
index 10408094..04f2ca1a 100644
--- a/puppet/modules/site_couchdb/manifests/init.pp
+++ b/puppet/modules/site_couchdb/manifests/init.pp
@@ -1,5 +1,7 @@
class site_couchdb {
+ include couchdb
+
$x509 = hiera('x509')
$key = $x509['key']
$cert = $x509['cert']
@@ -15,21 +17,17 @@ class site_couchdb {
$couchdb_ca_daemon_user = $couchdb_ca_daemon['username']
$couchdb_ca_daemon_pw = $couchdb_ca_daemon['password']
- Class['site_couchdb::package']
- -> Exec['refresh_apt']
- -> Package ['couchdb']
+ Package ['couchdb']
-> File['/etc/init.d/couchdb']
-> File['/etc/couchdb/local.ini']
-> File['/etc/couchdb/local.d/admin.ini']
-> File['/etc/couchdb/couchdb.netrc']
- -> Couchdb::Create_db[leap_web]
- -> Couchdb::Create_db[leap_ca]
+ -> Couchdb::Create_db['users']
+ -> Couchdb::Create_db['client_certificates']
-> Couchdb::Add_user[$couchdb_webapp_user]
-> Couchdb::Add_user[$couchdb_ca_daemon_user]
-> Site_couchdb::Apache_ssl_proxy['apache_ssl_proxy']
- # Setup couchdb
- include site_couchdb::package
include site_couchdb::configure
include couchdb::deploy_config
@@ -54,11 +52,11 @@ class site_couchdb {
pw => $couchdb_ca_daemon_pw
}
- couchdb::create_db { 'leap_web':
+ couchdb::create_db { 'users':
readers => "{ \"names\": [\"$couchdb_webapp_user\"], \"roles\": [] }"
}
- couchdb::create_db { 'leap_ca':
+ couchdb::create_db { 'client_certificates':
readers => "{ \"names\": [], \"roles\": [\"certs\"] }"
}
}