Files
puppet-nova/manifests/volume.pp
Dan Bode 616c4763c7 Refactor nova services to use generic_service
Previously, there was a lot of copy/paste code for
handling the various nova services.

This commit creates the define nova::generic_service
which is used to capture common code for
configuring nova services.

It also updates the following classes to use that code:
  - nova::api
  - nova::cert
  - nova::compute
  - nova::objectstore
  - nova::network
  - nova::sceduler
  - nova::volume

It also updates spec tests for all of these classes
2012-04-01 14:39:53 -07:00

25 lines
725 B
Puppet

class nova::volume(
$enabled=false
) inherits nova {
exec { 'volumes':
command => 'dd if=/dev/zero of=/tmp/nova-volumes.img bs=1M seek=20k count=0 && /sbin/vgcreate nova-volumes `/sbin/losetup --show -f /tmp/nova-volumes.img`',
onlyif => 'test ! -e /tmp/nova-volumes.img',
path => ["/usr/bin", "/bin", "/usr/local/bin"],
before => Service['nova-volume'],
}
ova::generic_service { 'volume':
enabled => $enabled,
package_name => $::nova::params::volume_package_name,
service_name => $::nova::params::volume_service_name,
}
# TODO is this fedora specific?
service {'tgtd':
ensure => $service_ensure,
enable => $enabled,
require => Package["openstack-nova"],
}
}