File: init.pp

package info (click to toggle)
puppet-module-rally 6.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 552 kB
  • sloc: ruby: 1,514; python: 37; sh: 10; makefile: 10
file content (61 lines) | stat: -rw-r--r-- 1,682 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# == Class: rally
#
# This class is used to specify configuration default section parameters in rally.
#
# === Parameters:
#
# [*package_ensure*]
#   (optional) The state of rally packages
#   Defaults to 'present'.
#
# [*rally_debug*]
#   (optional) Print debugging output only for Rally. (boolean value)
#   Defaults to $::os_service_default.
#
# [*openstack_client_http_timeout*]
#   (optional) HTTP timeout for any of OpenStack service in seconds (floating point value)
#   Defaults to $::os_service_default.
#
# [*purge_config*]
#   (optional) Whether to set only the specified config options
#   in the rally config.
#   Defaults to false.
#
# [*sync_db*]
#   (Optional) Run db sync on the node.
#   Defaults to true.
#
class rally (
  $package_ensure                = 'present',
  $rally_debug                   = $::os_service_default,
  $openstack_client_http_timeout = $::os_service_default,
  $purge_config                  = false,
  $sync_db                       = true,
) inherits ::rally::params {

  include rally::deps
  include rally::db
  include rally::settings

  # Keep backward compatibility
  $openstack_client_http_timeout_real = pick($::rally::settings::openstack_client_http_timeout,$openstack_client_http_timeout)

  package { 'rally':
    ensure => $package_ensure,
    name   => $::rally::params::package_name,
    tag    => ['openstack', 'rally-package'],
  }

  resources { 'rally_config':
    purge => $purge_config,
  }

  if $sync_db {
    include rally::db::sync
  }

  rally_config {
    'DEFAULT/rally_debug':                   value => $rally_debug;
    'DEFAULT/openstack_client_http_timeout': value => $openstack_client_http_timeout;
  }
}