summaryrefslogtreecommitdiff
path: root/manifests/add_user.pp
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2013-01-19 09:48:36 +0100
committervarac <varacanero@zeromail.org>2013-01-19 09:48:36 +0100
commit5b0374f4f3580dda8984667e26694d16e8a8dd42 (patch)
treecb265ab1769fac3ba83e2e9415d72ed944f32263 /manifests/add_user.pp
parentc51633bac9f42839ce09705c6f698611e1332c50 (diff)
add_user: moved to update script
Diffstat (limited to 'manifests/add_user.pp')
-rw-r--r--manifests/add_user.pp19
1 files changed, 5 insertions, 14 deletions
diff --git a/manifests/add_user.pp b/manifests/add_user.pp
index 560a6a8..26fc5dc 100644
--- a/manifests/add_user.pp
+++ b/manifests/add_user.pp
@@ -1,16 +1,7 @@
-define couchdb::add_user ($host='127.0.0.1:5984', $roles, $pw ) {
- couchdb::query { "create_user_$name":
- cmd => 'PUT',
- host => $host,
- url => "_users/org.couchdb.user:$name",
- data => "{ \"_id\": \"org.couchdb.user:$name\", \"type\": \"user\", \"name\": \"$name\", \"roles\": $roles, \"password\": \"$pw\"}",
+define couchdb::add_user ( $roles, $pw, $host='127.0.0.1:5984' ) {
+ couchdb::update { "update_user_$name":
+ db => '_users',
+ id => "org.couchdb.user:$name",
+ data => "{\"type\": \"user\", \"name\": \"$name\", \"roles\": $roles, \"password\": \"$pw\"}",
}
- #
- # couchdb::update { "update_user_$name":
- # db => "_users",
- # id => "org.couchdb.user:$name",
- # data => "{\"type\": \"user\", \"name\": \"$name\", \"roles\": $roles, \"password\": \"$pw\"}",
- # }
- #
}
-