diff options
author | varac <varacanero@zeromail.org> | 2013-08-29 19:26:36 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-08-29 19:26:36 +0200 |
commit | 32a0f9df6e80c15b3b49b8ad81b9a49ecc6f39dd (patch) | |
tree | 7d180ca7bf135523969956ed468b6224ff44ece8 /manifests/create_db.pp | |
parent | 61eca267cb52252371a71926a64d7f3b7350489d (diff) | |
parent | 321d463b43dc44a4f313aa6dabef1a8bdce27122 (diff) |
Merge branch 'master' of ssh://code.leap.se/puppet_couchdb
Conflicts:
manifests/create_db.pp
Diffstat (limited to 'manifests/create_db.pp')
-rw-r--r-- | manifests/create_db.pp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/manifests/create_db.pp b/manifests/create_db.pp index 22b3236..afab7b5 100644 --- a/manifests/create_db.pp +++ b/manifests/create_db.pp @@ -4,7 +4,7 @@ define couchdb::create_db ( $readers="{\"names\": [], \"roles\": [] }" ) { - Couchdb::Query["create_db_${name}"] -> Couchdb::Query["db_security_${name}"] + Couchdb::Query["create_db_${name}"] -> Couchdb::Document["${name}_security"] couchdb::query { "create_db_${name}": cmd => 'PUT', @@ -13,10 +13,10 @@ define couchdb::create_db ( unless => "/usr/bin/curl -s --netrc-file /etc/couchdb/couchdb.netrc ${host}/${name} | grep -q -v '{\"error\":\"not_found\"'" } - couchdb::query { "db_security_${name}": - cmd => 'PUT', + couchdb::document { "${name}_security": + db => $name, + id => '_security', host => $host, - url => "${name}/_security", data => "{ \"admins\": ${admins}, \"readers\": ${readers} }" } } |