blob: 7b0cabd70f4c45c4e583bde171d63733b07b3283 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
define site_couchdb::upload_design($db = $title, $design) {
$design_name = regsubst($design, '^.*\/(.*)\.json$', '\1')
$id = "_design/${design_name}"
$file = "/srv/leap/couchdb/designs/${design}"
exec {
"upload_design_${name}":
command => "/usr/local/bin/couch-doc-update --host 127.0.0.1:5984 --db '${db}' --id '${id}' --data '{}' --file '${file}'",
refreshonly => false,
loglevel => debug,
logoutput => on_failure,
require => File['/srv/leap/couchdb/designs'];
}
}
|