File: swauth.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 (40 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download | duplicates (2)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# == Class: swift::proxy::swauth
#
# === Parameters:
#
# [*package_ensure*]
#   The status of the python-swauth package.
#   Defaults to 'present'
#
# [*swauth_endpoint*]
#   (optional) The endpoint used to authenticate to Swauth WSGI.
#   Defaults to '127.0.0.1'
#
# [*swauth_super_admin_key*]
#   (optional) The Swauth WSGI filter admin key.
#   Defaults to 'swauthkey'
#
#
class swift::proxy::swauth(
  $swauth_endpoint = '127.0.0.1',
  $swauth_super_admin_key = 'swauthkey',
  $package_ensure = 'present'
) {

  include swift::deps

  warning('Support for swauth has been deprecaed and will be removed in a futue release.')

  package { 'python-swauth':
    ensure => $package_ensure,
    tag    => 'swift-package',
  }

  Package['python-swauth'] -> Package<| title == 'swift-proxy' |>

  swift_proxy_config {
    'filter:swauth/use':                   value => 'egg:swauth#swauth';
    'filter:swauth/default_swift_cluster': value => "local#${swauth_endpoint}";
    'filter:swauth/super_admin_key':       value => $swauth_super_admin_key;
  }
}