summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2013-08-28 12:47:40 +0200
committerAzul <azul@riseup.net>2013-08-28 12:53:12 +0200
commit321d463b43dc44a4f313aa6dabef1a8bdce27122 (patch)
treea43904f36314fada40892c75b2ffa88c57a36dce /manifests
parent8a0f585cbdb8f54d495f636e36b812a3d5b8b804 (diff)
minor: cleanup spacing (feature #3485)
Diffstat (limited to 'manifests')
-rw-r--r--manifests/document.pp19
1 files changed, 12 insertions, 7 deletions
diff --git a/manifests/document.pp b/manifests/document.pp
index afbd37a..77296dc 100644
--- a/manifests/document.pp
+++ b/manifests/document.pp
@@ -5,7 +5,12 @@
# ensure => {absent,present,*content*}
# }
#
-define couchdb::document ( $host='127.0.0.1:5984', $db, $id, $data='{}', $ensure='content') {
+define couchdb::document(
+ $db,
+ $id,
+ $host = '127.0.0.1:5984',
+ $data = '{}',
+ $ensure = 'content') {
$url = "${host}/${db}/${id}"
@@ -20,18 +25,18 @@ define couchdb::document ( $host='127.0.0.1:5984', $db, $id, $data='{}', $ensure
present: {
couchdb::query { "create_${db}_${id}":
- cmd => 'PUT',
- host => $host,
- path => "${db}/${id}",
+ cmd => 'PUT',
+ host => $host,
+ path => "${db}/${id}",
unless => "/usr/bin/curl --netrc-file /etc/couchdb/couchdb.netrc ${url}"
}
}
absent: {
couchdb::query { "destroy_${db}_${id}":
- cmd => 'DELETE',
- host => $host,
- path => "${db}/${id}",
+ cmd => 'DELETE',
+ host => $host,
+ path => "${db}/${id}",
onlyif => "/usr/bin/curl --netrc-file /etc/couchdb/couchdb.netrc ${url}"
}
}