puppet-cinder/manifests/volume.pp
Dan Bode 4a94945884 Add Redhat support
This commit adds red hat support to cinder.
- Adds Redhat package names
- Make package installations optional
- Make cinder client package name per OS
2012-11-05 22:36:58 -08:00

38 lines
949 B
Puppet

# $volume_name_template = volume-%s
class cinder::volume (
$package_ensure = 'latest',
$enabled = true
) {
include cinder::params
Cinder_config<||> ~> Service['cinder-volume']
Cinder_api_paste_ini<||> ~> Service['cinder-volume']
if $::cinder::params::volume_package {
Package['cinder-volume'] -> Cinder_config<||>
Package['cinder-volume'] -> Cinder_api_paste_ini<||>
Package['cinder'] -> Package['cinder-volume']
Package['cinder-volume'] -> 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'],
subscribe => File[$::cinder::params::cinder_conf],
}
}