Puppet Class: kickstack::rpc

Inherits:
kickstack
Defined in:
manifests/rpc.pp

Overview



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
# File 'manifests/rpc.pp', line 1

class kickstack::rpc inherits kickstack {
  case "$rpc" {
    'rabbitmq': {
      Class['nova::rabbitmq'] -> Exportfact::Export<| tag == 'rabbit' |>

      $rabbit_password = pick(getvar("${::kickstack::fact_prefix}rabbit_password"),pwgen())

      class { 'nova::rabbitmq':
        userid => "$::kickstack::rabbit_userid",
        password => "$rabbit_password",
        virtual_host => "$::kickstack::rabbit_virtual_host"
      }

      kickstack::exportfact::export { "rabbit_host":
        value => "$hostname",
        tag => "rabbit"
      }

      kickstack::exportfact::export { "rabbit_password":
        value => "$rabbit_password",
        tag => "rabbit"
      }

    }
    'qpid': {
      Class['nova::qpid'] -> Exportfact::Export<| tag == 'qpid' |>

      $qpid_password = pick(getvar("${::kickstack::fact_prefix}qpid_password"),pwgen())

      class { 'nova::qpid':
        user => "$::kickstack_qpid_username",
        password => "$qpid_password",
        realm => "$::kickstack_qpid_realm"
      }

      kickstack::exportfact::export { "qpid_hostname":
        value => "$hostname",
        tag => "qpid"
      }

      kickstack::exportfact::export { "qpid_password":
        value => "$qpid_password",
        tag => "qpid"
      }
    }
    default: {
      warn("Unsupported RPC server type: ${rpc_server}")
    }
  }
}