Added exec to serve as an anchor for post-config.

Forwards notifications to services to clean up graph.
This commit is contained in:
Dan Bode 2011-06-21 13:52:04 -07:00
parent 710ea71287
commit 52fa7b5435
6 changed files with 12 additions and 6 deletions

View File

@ -1,6 +1,6 @@
class nova::api($enabled=false) {
Nova_config<| |> ~> Service['nova-api']
Exec['post-nova_config'] ~> Service['nova-api']
if $enabled {
$service_ensure = 'running'

View File

@ -8,7 +8,7 @@ class nova::compute(
$libvirt_type = 'kvm'
) {
Nova_config<| |> ~> Service['nova-compute']
Exec['post-nova_config'] ~> Service['nova-compute']
nova_config { 'libvirt_type': value => $libvirt_type }

View File

@ -26,7 +26,8 @@ class nova(
Nova_config<| |> {
require +> Package["nova-common"],
before +> File['/etc/nova/nova.conf']
before +> File['/etc/nova/nova.conf'],
notify +> Exec['post-nova_config']
}
# TODO - why is this required?
package { ['python', 'python-greenlet']:
@ -94,6 +95,11 @@ class nova(
'service_down_time': value => $service_down_time;
}
exec { 'post-nova_config':
command => '/bin/echo "Nova config has changed"',
refreshonly => true,
}
if $image_service == 'nova.image.glance.GlanceImageService' {
nova_config {
'glance_host': value => $glance_host;

View File

@ -1,6 +1,6 @@
class nova::network( $enabled=false ) {
Nova_config<| |> ~> Service['nova-network']
Exec['post-nova_config'] ~> Service['nova-network']
if $enabled {
$service_ensure = 'running'

View File

@ -1,6 +1,6 @@
class nova::objectstore( $enabled=false ) {
Nova_config<| |> ~> Service['nova-objectstore']
Exec['post-nova_config'] ~> Service['nova-objectstore']
if $enabled {
$service_ensure = 'running'

View File

@ -1,6 +1,6 @@
class nova::scheduler( $enabled ) {
Nova_config<| |> ~> Service['nova-scheduler']
Exec['post-nova_config'] ~> Service['nova-scheduler']
if $enabled {
$service_ensure = 'running'