From 321d463b43dc44a4f313aa6dabef1a8bdce27122 Mon Sep 17 00:00:00 2001 From: Azul Date: Wed, 28 Aug 2013 12:47:40 +0200 Subject: minor: cleanup spacing (feature #3485) --- manifests/document.pp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'manifests') 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}" } } -- cgit v1.2.3