Puppet Class: certs::qpid_router::client

Inherits:
certs
Defined in:
manifests/qpid_router/client.pp

Overview

Constains certs specific configurations for qpid dispatch router

Parameters:

  • hostname (String) (defaults to: $certs::node_fqdn)
  • cname (Array[Stdlib::Fqdn]) (defaults to: $certs::cname)
  • generate (Boolean) (defaults to: $certs::generate)
  • regenerate (Boolean) (defaults to: $certs::regenerate)
  • deploy (Boolean) (defaults to: $certs::deploy)
  • cert (Stdlib::Absolutepath) (defaults to: $certs::qpid_router_client_cert)
  • key (Stdlib::Absolutepath) (defaults to: $certs::qpid_router_client_key)
  • owner (String) (defaults to: 'qdrouterd')
  • group (String) (defaults to: 'root')
  • country (String[2,2]) (defaults to: $certs::country)
  • state (String) (defaults to: $certs::state)
  • city (String) (defaults to: $certs::city)
  • org_unit (String) (defaults to: $certs::org_unit)
  • expiration (String) (defaults to: $certs::expiration)
  • ca_key_password_file (Stdlib::Absolutepath) (defaults to: $certs::ca_key_password_file)


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
# File 'manifests/qpid_router/client.pp', line 2

class certs::qpid_router::client (
  String $hostname = $certs::node_fqdn,
  Array[Stdlib::Fqdn] $cname = $certs::cname,
  Boolean $generate = $certs::generate,
  Boolean $regenerate = $certs::regenerate,
  Boolean $deploy = $certs::deploy,
  Stdlib::Absolutepath $cert = $certs::qpid_router_client_cert,
  Stdlib::Absolutepath $key = $certs::qpid_router_client_key,
  String $owner = 'qdrouterd',
  String $group = 'root',
  String[2,2] $country = $certs::country,
  String $state = $certs::state,
  String $city = $certs::city,
  String $org_unit = $certs::org_unit,
  String $expiration = $certs::expiration,
  Stdlib::Absolutepath $ca_key_password_file = $certs::ca_key_password_file,
) inherits certs {
  $client_keypair = "${hostname}-qpid-router-client"

  cert { $client_keypair:
    ensure        => present,
    hostname      => $hostname,
    cname         => $cname,
    country       => $country,
    state         => $state,
    city          => $city,
    org           => 'dispatch client',
    org_unit      => $org_unit,
    expiration    => $expiration,
    ca            => $certs::default_ca,
    generate      => $generate,
    regenerate    => $regenerate,
    deploy        => false,
    purpose       => 'client',
    password_file => $ca_key_password_file,
    build_dir     => $certs::ssl_build_dir,
  }

  if $deploy {
    certs::keypair { $client_keypair:
      source_dir => "${certs::ssl_build_dir}/${hostname}",
      key_file   => $key,
      key_owner  => $owner,
      key_group  => $group,
      key_mode   => '0440',
      cert_file  => $cert,
      cert_owner => $owner,
      cert_group => $group,
      cert_mode  => '0640',
      require    => Cert[$client_keypair],
    }
  }
}