diff options
author | varac <varacanero@zeromail.org> | 2013-09-04 09:45:41 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-09-04 09:46:46 +0200 |
commit | dacaeb4d98be9468336923f5501822d389bda768 (patch) | |
tree | b237cc1faef77afe3e142e173c64d258e201eb46 /manifests | |
parent | f59e8b2e4aad3023f46ae3a1aad655b06605ee84 (diff) |
don't use couchdb::document for creating _security, cause this special doc doesn't have and _id (#3706)
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/create_db.pp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/manifests/create_db.pp b/manifests/create_db.pp index 690892c..32bc974 100644 --- a/manifests/create_db.pp +++ b/manifests/create_db.pp @@ -4,8 +4,6 @@ define couchdb::create_db ( $readers="{\"names\": [], \"roles\": [] }" ) { - Couchdb::Query["create_db_${name}"] -> Couchdb::Document["${name}_security"] - couchdb::query { "create_db_${name}": cmd => 'PUT', host => $host, @@ -13,10 +11,11 @@ define couchdb::create_db ( unless => "/usr/bin/curl -s --netrc-file /etc/couchdb/couchdb.netrc ${host}/${name} | grep -q -v '{\"error\":\"not_found\"'" } - couchdb::document { "${name}_security": - db => $name, - id => '_security', - host => $host, - data => "{ \"admins\": ${admins}, \"readers\": ${readers} }" + couchdb::query { "${name}_security": + cmd => 'PUT', + host => $host, + path => "${name}/_security", + data => "{ \"admins\": ${admins}, \"readers\": ${readers} }", + require => Couchdb::Query["create_db_${name}"] } } |