summaryrefslogtreecommitdiff
path: root/manifests/create_db.pp
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-09-18 16:51:04 +0200
committerAzul <azul@riseup.net>2013-09-18 16:51:04 +0200
commita5a89d49888aa6123b78c37b72ec34177f40dcaf (patch)
treeace9383f8fc9d53e1e26c314f2555e0927d7c8e9 /manifests/create_db.pp
parentadbe5e98e61855c71d73539fa8dba917a82b111a (diff)
use curl -f instead of curl | grep -v "error"
curl -f will fail if a 400 or 500 response code is returned
Diffstat (limited to 'manifests/create_db.pp')
-rw-r--r--manifests/create_db.pp2
1 files changed, 1 insertions, 1 deletions
diff --git a/manifests/create_db.pp b/manifests/create_db.pp
index 32bc974..9ba921c 100644
--- a/manifests/create_db.pp
+++ b/manifests/create_db.pp
@@ -8,7 +8,7 @@ define couchdb::create_db (
cmd => 'PUT',
host => $host,
path => $name,
- unless => "/usr/bin/curl -s --netrc-file /etc/couchdb/couchdb.netrc ${host}/${name} | grep -q -v '{\"error\":\"not_found\"'"
+ unless => "/usr/bin/curl -s -f --netrc-file /etc/couchdb/couchdb.netrc ${host}/${name}"
}
couchdb::query { "${name}_security":