solar/resources/cinder_volume_puppet/actions/run.pp
Bogdan Dobrelya 847f17b1a3 Add cinder volume ISCSI resource
Add ISCSI backend as enabled default for the
cinder_volume resource. Note, cannot be decoupled
as a separate resource because of the external
puppet class reference hardcoded upstream.

Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
2015-08-04 10:09:46 +02:00

31 lines
924 B
Puppet

$resource = hiera($::resource_name)
$package_ensure = $resource['input']['package_ensure']['value']
$use_iscsi_backend = $resource['input']['use_iscsi_backend']['value']
$iscsi_ip_address = $resource['input']['iscsi_ip_address']['value']
$volume_driver = $resource['input']['volume_driver']['value']
$volume_group = $resource['input']['volume_group']['value']
$iscsi_helper = $resource['input']['iscsi_helper']['value']
include cinder::params
package { 'cinder':
ensure => $package_ensure,
name => $::cinder::params::package_name,
} ->
class {'cinder::volume':
package_ensure => $package_ensure,
enabled => true,
manage_service => true,
}
if $use_iscsi_backend {
class {'cinder::volume::iscsi':
iscsi_ip_address => $iscsi_ip_address,
volume_driver => $volume_driver,
volume_group => $volume_group,
iscsi_helper => $iscsi_helper,
}
}