Puppet Class: cubbystack::nova
- Defined in:
- manifests/nova.pp
Overview
Class: cubbystack::nova
Configures the nova-common package and nova.conf
Parameters
- settings
-
A hash of key => value settings to go in cinder.conf
- package_ensure
-
The status of the nova-common package Defaults to latest
- config_file
-
The path to nova.conf Defaults to /etc/nova/nova.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 75 76 77 78 79 |
# File 'manifests/nova.pp', line 18
class cubbystack::nova (
$settings,
$package_ensure = latest,
$config_file = '/etc/nova/nova.conf',
) {
include ::cubbystack::params
## Meta settings and globals
$tags = ['openstack', 'nova']
# Make sure nova is installed before configuration begins
Package<| tag == 'nova' |> -> Cubbystack_config<| tag == 'nova' |>
Cubbystack_config<| tag == 'nova' |> -> Service<| tag == 'nova' |>
# Restart nova services whenever nova.conf has been changed
Cubbystack_config<| tag == 'nova' |> ~> Service<| tag == 'nova' |>
# Global file attributes
File {
ensure => present,
owner => 'nova',
group => 'nova',
mode => '0640',
tag => $tags,
require => Package['nova-common'],
}
# nova-common package
package { 'nova-common':
name => $::cubbystack::params::nova_common_package_name,
ensure => present,
tag => $tags,
}
## Nova configuration files
file { '/var/log/nova':
ensure => directory,
recurse => true,
}
file { '/etc/nova':
ensure => directory,
recurse => true,
}
file { $config_file: }
# nova-manage insists on 0644
file { '/var/log/nova/nova-manage.log':
mode => '0644',
}
## Configure nova.conf
$settings.each |$setting, $value| {
cubbystack_config { "${config_file}: ${setting}":
value => $value,
tag => $tags,
}
}
}
|