puppet-cinder/manifests/volume.pp
Dan Bode 14a96dc17f update cinder for folsome
These are my initial changes to Joe's initial cinder module.
2012-10-11 02:11:23 -07:00

35 lines
858 B
Puppet

# $volume_name_template = volume-%s
class cinder::volume (
$package_ensure = 'latest',
$enabled = true
) {
include cinder::params
Package['cinder-volume'] -> Cinder_config<||>
Package['cinder-volume'] -> Cinder_api_paste_ini<||>
Package['cinder'] -> Package['cinder-volume']
Cinder_config<||> ~> Service['cinder-volume']
Cinder_api_paste_ini<||> ~> Service['cinder-volume']
package { 'cinder-volume':
name => $::cinder::params::volume_package,
ensure => $package_ensure,
}
if $enabled {
$ensure = 'running'
} else {
$ensure = 'stopped'
}
service { 'cinder-volume':
name => $::cinder::params::volume_service,
enable => $enabled,
ensure => $ensure,
require => Package[$::cinder::params::volume_package],
subscribe => File[$::cinder::params::cinder_conf],
}
}