blob: c8f5d8a7daa5c4f11a33a05ece4e982f039d193a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#
# custom logic for couchdb json resolution
#
unless nodes_like_me['services' => 'couchdb']['couch.master' => true].any?
raise 'node `%s`, environment `%s`: there must be at least one node with couch.master set to `true` for this environment.' % [@node.name, @node.environment]
end
if couch.master
if nodes_like_me['services' => 'couchdb']['couch.master' => true].size > 1
apply_partial 'services/_couchdb_multimaster.json'
else
apply_partial 'services/_couchdb_master.json'
end
else
apply_partial 'services/_couchdb_mirror.json'
end
|