From 158a89ed0172cc7f96d1a6922f776fcd3c39b877 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 11 Dec 2012 02:28:16 -0800 Subject: added couchdb::update (commented out) --- manifests/add_user.pp | 7 +++++++ manifests/update.pp | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 manifests/update.pp (limited to 'manifests') diff --git a/manifests/add_user.pp b/manifests/add_user.pp index acadcd0..560a6a8 100644 --- a/manifests/add_user.pp +++ b/manifests/add_user.pp @@ -5,5 +5,12 @@ define couchdb::add_user ($host='127.0.0.1:5984', $roles, $pw ) { url => "_users/org.couchdb.user:$name", data => "{ \"_id\": \"org.couchdb.user:$name\", \"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\"}", + # } + # } diff --git a/manifests/update.pp b/manifests/update.pp new file mode 100644 index 0000000..129d875 --- /dev/null +++ b/manifests/update.pp @@ -0,0 +1,3 @@ +define couchdb::update ($db, $id, $data) { + exec { "couch-doc-update --db $db --id $id --data \'$data\'": } +} -- cgit v1.2.3