Puppet Class: cubbystack::neutron::l3
- Defined in:
- manifests/neutron/l3.pp
Overview
Class: cubbystack::neutron::l3
Configures the neutron-l3
Parameters
- package_ensure
-
The status of the neutron-l3 package Defaults to latest
- service_enable
-
The status of the neutron-l3 service Defaults to true
- settings
-
A hash of key => value settings to go in l3_agent.ini
- config_file
-
The path to l3_agent.ini Defaults to /etc/neutron/l3_agent.ini
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/l3.pp', line 22
class cubbystack::neutron::l3 (
$settings,
$package_ensure = latest,
$service_enable = true,
$config_file = '/etc/neutron/l3_agent.ini',
) {
include ::cubbystack::params
## Meta settings and globals
$tags = ['openstack', 'neutron', 'neutron-l3']
# Make sure Neutron L3 is installed before any configuration begins
# Make sure Neutron L3 is configured before the service starts
Package<| tag == 'neutron' |> -> Cubbystack_config<| tag == 'neutron-l3' |>
Package<| tag == 'neutron' |> -> File<| tag == 'neutron-l3' |>
Cubbystack_config<| tag == 'neutron-l3' |> -> Service['neutron-l3']
# Restart neutron-l3 after any config changes
Cubbystack_config<| tag == 'neutron-l3' |> ~> Service['neutron-l3']
File {
ensure => present,
owner => 'neutron',
group => 'neutron',
mode => '0640',
tag => $tags,
notify => Service['neutron-l3'],
}
## Neutron L3 configuration
file { $config_file: }
# Configure the L3 service
$settings.each |$setting, $value| {
cubbystack_config { "${config_file}: ${setting}":
value => $value,
tag => $tags,
}
}
cubbystack::functions::generic_service { 'neutron-l3':
service_enable => $service_enable,
package_ensure => $package_ensure,
package_name => $::cubbystack::params::neutron_l3_package_name,
service_name => $::cubbystack::params::neutron_l3_service_name,
tags => $tags,
}
}
|