File: tempauth_account.pp

package info (click to toggle)
puppet-module-swift 25.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,400 kB
  • sloc: ruby: 9,593; python: 38; sh: 10; makefile: 10
file content (25 lines) | stat: -rw-r--r-- 711 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# == class: swift::proxy::tempauth_account
# This class manages tempauth account_users
#
#  [*title*]
#    A string containing account data to write to proxy.conf
#    Required
#    Example: "user_<account>_<user>, <key> .<group1> .<groupx>"
#    Result in proxy.conf: user_<account>_<user> = <key> .<group1> .<groupx>
#
# == Authors
#
#   Adam Vinsh <adam.vinsh@charter.com>
#
define swift::proxy::tempauth_account() {

  include swift::deps

  # strip white space and split string into array elements around ','
  $account_data = strip(split($title,','))
  if $account_data[0] != '' {
    swift_proxy_config {
      "filter:tempauth/${account_data[0]}": value => $account_data[1], secret => true;
    }
  }
}