puppet-nova/manifests/api.pp
Dan Bode b97237db88 Service depends on nova-db-sync
According to the multi-node install insturctions,
the services should be started/restarted after the
management objects are created and database is 
restarted.
2011-06-24 09:06:55 -07:00

30 lines
717 B
Puppet

class nova::api($enabled=false) {
Exec['post-nova_config'] ~> Service['nova-api']
Exec['nova-db-sync'] ~> 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"]
}
}