Files
puppet-nova/manifests/api.pp
Dan Bode a913d5d600 nova-api should notify db sync
Something has to tell it to sync if it is not
on the same node as the database.
2011-06-22 17:00:55 -07:00

29 lines
671 B
Puppet

class nova::api($enabled=false) {
Exec['post-nova_config'] ~> Service['nova-api']
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
exec { "initial-db-sync":
command => "/usr/bin/nova-manage db sync",
refreshonly => true,
require => [Package["nova-common"], Nova_config['sql_connection']],
}
package { "nova-api":
ensure => present,
require => Package["python-greenlet"],
notify => Exec['initial-db-sync'],
}
service { "nova-api":
ensure => $service_ensure,
enable => $enabled,
require => Package["nova-api"],
#subscribe => File["/etc/nova/nova.conf"]
}
}