Puppet Class: profile::openstack::base::nova::fullstack::service

Defined in:
modules/profile/manifests/openstack/base/nova/fullstack/service.pp

Overview

SPDX-License-Identifier: Apache-2.0

Parameters:

  • osstackcanary_pass (Any) (defaults to: lookup('profile::openstack::base::nova::fullstack_pass'))
  • openstack_control_nodes (Array[OpenStack::ControlNode]) (defaults to: lookup('profile::openstack::base::openstack_control_nodes'))
  • region (Any) (defaults to: lookup('profile::openstack::base::region'))
  • network (Any) (defaults to: lookup('profile::openstack::base::nova::instance_network_id'))
  • puppetmaster (Any) (defaults to: lookup('profile::openstack::base::puppetmaster_hostname'))
  • bastion_ip (Any) (defaults to: lookup('profile::openstack::base::nova::fullstack_bastion_ip'))
  • deployment (Any) (defaults to: lookup('profile::openstack::base::nova::fullstack_deployment'))
  • _nameservers (Any) (defaults to: lookup('profile::openstack::base::nova::fullstack::nameservers'))


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
# File 'modules/profile/manifests/openstack/base/nova/fullstack/service.pp', line 2

class profile::openstack::base::nova::fullstack::service(
    $osstackcanary_pass = lookup('profile::openstack::base::nova::fullstack_pass'),
    Array[OpenStack::ControlNode] $openstack_control_nodes = lookup('profile::openstack::base::openstack_control_nodes'),
    $region = lookup('profile::openstack::base::region'),
    $network = lookup('profile::openstack::base::nova::instance_network_id'),
    $puppetmaster = lookup('profile::openstack::base::puppetmaster_hostname'),
    $bastion_ip = lookup('profile::openstack::base::nova::fullstack_bastion_ip'),
    $deployment = lookup('profile::openstack::base::nova::fullstack_deployment'),
    $_nameservers = lookup('profile::openstack::base::nova::fullstack::nameservers')
    ) {

    $nameservers = $_nameservers.map |$ns| {
        if $ns =~ Stdlib::IP::Address {
            $ns
        } else {
            dnsquery::lookup($ns, true)
        }
    }.flatten.sort

    # We only want this running in one place; just pick the second
    #  host in $openstack_control_nodes.
    $active = $::facts['networking']['fqdn'] == $openstack_control_nodes[1]['host_fqdn']

    class { '::openstack::nova::fullstack::service':
        active       => $active,
        password     => $osstackcanary_pass,
        region       => $region,
        network      => $network,
        puppetmaster => $puppetmaster,
        bastion_ip   => $bastion_ip,
        deployment   => $deployment,
        resolvers    => $nameservers,
    }
    contain '::openstack::nova::fullstack::service'

    if $active {
        class {'::openstack::nova::fullstack::monitor':}
    }
}