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