diff options
author | Azul <azul@riseup.net> | 2014-06-20 18:08:02 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2014-06-20 18:08:02 +0200 |
commit | 630ae0d3a9e80c189f485b3e79fbbe0aecd21d7c (patch) | |
tree | 1e4b5bbed1c5c2681fa59a2ce7005699b0dedcff /manifests/query.pp | |
parent | 75e62f1aa97b6702b82d28ddc768a92c0a831b5c (diff) |
allow setting custom netrc in query and document defines
We need to perform some actions as the replication user for plain couch.
Diffstat (limited to 'manifests/query.pp')
-rw-r--r-- | manifests/query.pp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/manifests/query.pp b/manifests/query.pp index 72ae4d2..9507ca1 100644 --- a/manifests/query.pp +++ b/manifests/query.pp @@ -1,7 +1,11 @@ define couchdb::query ( - $cmd, $path, $host='127.0.0.1:5984', $data = '{}', $unless = undef) { + $cmd, $path, + $netrc='/etc/couchdb/couchdb.netrc', + $host='127.0.0.1:5984', + $data = '{}', + $unless = undef) { - exec { "/usr/bin/curl -s --netrc-file /etc/couchdb/couchdb.netrc -X ${cmd} ${host}/${path} --data \'${data}\'": + exec { "/usr/bin/curl -s --netrc-file ${netrc} -X ${cmd} ${host}/${path} --data \'${data}\'": require => [ Package['curl'], Exec['wait_for_couchdb'] ], unless => $unless } |