summaryrefslogtreecommitdiff
path: root/puppet/modules/tapicero
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2014-12-23 16:47:35 -0500
committerMicah Anderson <micah@leap.se>2014-12-23 16:47:35 -0500
commit574a0554a95ba74867ebd0ca4a93195bfa104c14 (patch)
treefd07b5b2ec8b32e82aa665dad117ee6e51791884 /puppet/modules/tapicero
parent126faf8606f4911ccc3c1f55a9e0f381a46d536a (diff)
parentfc9a8af17d927085486052a53233401c42b0caab (diff)
Merge branch 'develop'
Conflicts: platform.rb Change-Id: Ic2e08e594d29a585691341c8667ac0b64933a505
Diffstat (limited to 'puppet/modules/tapicero')
-rw-r--r--puppet/modules/tapicero/manifests/init.pp4
-rw-r--r--puppet/modules/tapicero/templates/tapicero.yaml.erb12
2 files changed, 13 insertions, 3 deletions
diff --git a/puppet/modules/tapicero/manifests/init.pp b/puppet/modules/tapicero/manifests/init.pp
index f2e723f5..28711b94 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']
@@ -93,7 +95,7 @@ class tapicero {
vcsrepo { '/srv/leap/tapicero':
ensure => present,
force => true,
- revision => 'origin/master',
+ revision => 'origin/version/0.6',
provider => git,
source => 'https://leap.se/git/tapicero',
owner => '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
+