summaryrefslogtreecommitdiff
path: root/puppet/modules/tapicero
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/tapicero')
-rw-r--r--puppet/modules/tapicero/manifests/init.pp2
-rw-r--r--puppet/modules/tapicero/templates/tapicero.yaml.erb12
2 files changed, 12 insertions, 2 deletions
diff --git a/puppet/modules/tapicero/manifests/init.pp b/puppet/modules/tapicero/manifests/init.pp
index f2e723f5..2bf72004 100644
--- a/puppet/modules/tapicero/manifests/init.pp
+++ b/puppet/modules/tapicero/manifests/init.pp
@@ -12,6 +12,8 @@ class tapicero {
$couchdb_soledad_user = $couchdb_users['soledad']['username']
$couchdb_leap_mx_user = $couchdb_users['leap_mx']['username']
+ $couchdb_mode = $couchdb['mode']
+ $couchdb_replication = $couchdb['replication']
Class['site_config::default'] -> Class['tapicero']
diff --git a/puppet/modules/tapicero/templates/tapicero.yaml.erb b/puppet/modules/tapicero/templates/tapicero.yaml.erb
index 8e19b22f..510450ad 100644
--- a/puppet/modules/tapicero/templates/tapicero.yaml.erb
+++ b/puppet/modules/tapicero/templates/tapicero.yaml.erb
@@ -1,3 +1,5 @@
+<%- require 'json' -%>
+
#
# Default configuration options for Tapicero
#
@@ -24,6 +26,10 @@ log_level: info
options:
# prefix for per user databases:
db_prefix: "user-"
+ mode: <%= @couchdb_mode %>
+<%- if @couchdb_replication %>
+ replication: <%= @couchdb_replication.to_json %>
+<%- end -%>
# security settings to be used for the per user databases
security:
@@ -34,9 +40,11 @@ options:
# explicit about this
- <%= @couchdb_admin_user %>
roles: []
- readers:
+ members:
names:
- <%= @couchdb_soledad_user %>
- <%= @couchdb_leap_mx_user %>
- roles: []
+ roles:
+ - replication
+