summaryrefslogtreecommitdiff
path: root/manifests/update.pp
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-08-14 12:19:27 +0200
committerAzul <azul@riseup.net>2013-08-14 12:35:53 +0200
commit4310152ba3a2a86c9ef72250cd9e1d30f86bbb0f (patch)
tree398edeb6433343132aca44722e91f017ab15eaba /manifests/update.pp
parentf317163e8aa6abfc992df5ef65d99b0861488d41 (diff)
only create or update a user record if needed
We test the user account by trying to use it to retrieve / on the couch which prints a welcome message if the user is valid and returns a 401 otherwise.
Diffstat (limited to 'manifests/update.pp')
-rw-r--r--manifests/update.pp5
1 files changed, 3 insertions, 2 deletions
diff --git a/manifests/update.pp b/manifests/update.pp
index b7e6fc1..bbd2591 100644
--- a/manifests/update.pp
+++ b/manifests/update.pp
@@ -1,6 +1,7 @@
-define couchdb::update ($db, $id, $data, $port='5984') {
+define couchdb::update ($db, $id, $data, $port='5984', $unless='/bin/false') {
exec { "couch-doc-update --port ${port} --db ${db} --id ${id} --data \'${data}\'":
- require => Exec['wait_for_couchdb']
+ require => Exec['wait_for_couchdb'],
+ unless => $unless
}
}