Puppet Class: tripleo::profile::base::nova::metadata

Defined in:
manifests/profile/base/nova/metadata.pp

Overview

Parameters:

  • bootstrap_node (Any) (defaults to: lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef))
  • certificates_specs (Any) (defaults to: lookup('apache_certificates_specs', undef, undef, {}))
  • enable_internal_tls (Any) (defaults to: lookup('enable_internal_tls', undef, undef, false))
  • nova_metadata_network (Any) (defaults to: lookup('nova_metadata_network', undef, undef, undef))
  • step (Any) (defaults to: Integer(lookup('step')))
  • configure_apache (Any) (defaults to: lookup('configure_apache', undef, undef, true))


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'manifests/profile/base/nova/metadata.pp', line 53

class tripleo::profile::base::nova::metadata (
  $bootstrap_node        = lookup('nova_metadata_short_bootstrap_node_name', undef, undef, undef),
  $certificates_specs    = lookup('apache_certificates_specs', undef, undef, {}),
  $enable_internal_tls   = lookup('enable_internal_tls', undef, undef, false),
  $nova_metadata_network = lookup('nova_metadata_network', undef, undef, undef),
  $step                  = Integer(lookup('step')),
  $configure_apache      = lookup('configure_apache', undef, undef, true),
) {
  if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
    $is_bootstrap = true
  } else {
    $is_bootstrap = false
  }

  include tripleo::profile::base::nova
  include tripleo::profile::base::nova::authtoken

  if $enable_internal_tls {
    if !$nova_metadata_network {
      fail('nova_metadata_network is not set in the hieradata.')
    }
    $tls_certfile = $certificates_specs["httpd-${nova_metadata_network}"]['service_certificate']
    $tls_keyfile = $certificates_specs["httpd-${nova_metadata_network}"]['service_key']
  } else {
    $tls_certfile = undef
    $tls_keyfile = undef
  }

  if $step >= 4 or ( $step >= 3 and $is_bootstrap ) {
    include nova::cors
    include nova::network::neutron
    include nova::metadata
    include nova::vendordata
    if $configure_apache {
      include tripleo::profile::base::apache
      class { 'nova::wsgi::apache_metadata':
        ssl_cert => $tls_certfile,
        ssl_key  => $tls_keyfile,
      }
    }
  }
}