summaryrefslogtreecommitdiff
path: root/manifests/add_user.pp
blob: 26fc5dcc504b86e6b410a560aaffbc2007fa6c6b (plain)
1
2
3
4
5
6
7
define couchdb::add_user ( $roles, $pw, $host='127.0.0.1:5984' ) {
  couchdb::update { "update_user_$name":
    db    => '_users',
    id    => "org.couchdb.user:$name",
    data  => "{\"type\": \"user\", \"name\": \"$name\", \"roles\": $roles, \"password\": \"$pw\"}",
  }
}