Puppet Class: cubbystack::heat

Defined in:
manifests/heat.pp

Overview

Class: cubbystack::heat

Configures the heat-common package and heat.conf

Parameters

settings

A hash of key => value settings to go in cinder.conf

package_ensure

The status of the heat-common package Defaults to latest

config_file

The path to heat.conf Defaults to /etc/heat/heat.conf

Parameters:

  • settings (Any)
  • package_ensure (Any) (defaults to: latest)
  • config_file (Any) (defaults to: '/etc/heat/heat.conf')


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
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'manifests/heat.pp', line 18

class cubbystack::heat (
  $settings,
  $package_ensure = latest,
  $config_file    = '/etc/heat/heat.conf',
) {

  include ::cubbystack::params

  ## Meta settings and globals
  $tags = ['openstack', 'heat']

  # Make sure heat is installed before configuration begins
  Package<| tag == 'heat' |> -> Cubbystack_config<| tag == 'heat' |>
  Cubbystack_config<| tag == 'heat' |> -> Service<| tag == 'heat' |>

  # Restart heat services whenever heat.conf has been changed
  Cubbystack_config<| tag == 'heat' |> ~> Service<| tag == 'heat' |>

  # Global file attributes
  File {
    ensure  => present,
    owner   => 'heat',
    group   => 'heat',
    mode    => '0640',
    tag     => $tags,
    require => Package['heat-common'],
  }

  # heat-common package
  package { 'heat-common':
    name   => $::cubbystack::params::heat_common_package_name,
    ensure => present,
    tag    => $tags,
  }

  ## Nova configuration files
  file { '/var/log/heat':
    ensure  => directory,
    recurse => true,
  }

  file { '/etc/heat':
    ensure  => directory,
    recurse => true,
  }

  file { $config_file: }

  ## Configure heat.conf
  $settings.each |$setting, $value| {
    cubbystack_config { "${config_file}: ${setting}":
      value => $value,
      tag   => $tags,
    }
  }

}