summaryrefslogtreecommitdiff
path: root/provider_base/services/couchdb.rb
blob: 124c1b6c432845c714b8037e2916f21e642c912d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# custom logic for couchdb json resolution
# ============================================
#
# bigcouch is no longer maintained, so now the default behavior is
# to always use plain couchdb, unless there are more than one couchdb
# node or if "couch.mode" property is set to "multimaster".
#

couchdb_nodes = nodes_like_me['services' => 'couchdb']

if couchdb_nodes.size > 1 || self['couch']['mode'] == "multimaster"
  apply_partial 'services/_couchdb_multimaster.json'
else
  apply_partial 'services/_couchdb_plain.json'
end