diff options
author | Azul <azul@riseup.net> | 2014-06-23 22:07:13 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2014-06-23 22:07:13 +0200 |
commit | 15092303c4828331457e7cebcae470de7ea7f3c7 (patch) | |
tree | d01d0b0d6f23fd3b986e40717f0995d820799e5d | |
parent | 6a2f8b50a0374d467662d9c3325c7229468f607d (diff) |
create netrc files for all users
-rw-r--r-- | manifests/add_user.pp | 6 | ||||
-rw-r--r-- | manifests/query/setup.pp | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/manifests/add_user.pp b/manifests/add_user.pp index 1d25fd5..29c6a8c 100644 --- a/manifests/add_user.pp +++ b/manifests/add_user.pp @@ -30,4 +30,10 @@ define couchdb::add_user ( $roles, $pw, $salt = '' ) { id => "org.couchdb.user:${name}", data => $data } + + couchdb::query::setup { $name: + user => $name, + pw => $pw, + } + } diff --git a/manifests/query/setup.pp b/manifests/query/setup.pp index b68e54f..451eb53 100644 --- a/manifests/query/setup.pp +++ b/manifests/query/setup.pp @@ -1,6 +1,6 @@ define couchdb::query::setup ($user, $pw, $host='127.0.0.1') { - file { '/etc/couchdb/couchdb.netrc': + file { "/etc/couchdb/couchdb-${user}.netrc": content => "machine ${host} login ${user} password ${pw}", mode => '0600', owner => $::couchdb::base::couchdb_user, |