Mathieu Gagné d3bc94f168 Various Puppet lint fixes
* Fixes following warnings:
    * double quoted string containing no variables
    * string containing only a variable
    * variable not enclosed in {}
    * indentation of => is not properly aligned
* Fix following error:
    * two-space soft tabs not used
* Remove some comments from the code, they added no value.

Change-Id: I3165e65e95c3565951077786d2edf77245460c35
2013-07-01 16:09:34 -04:00

47 lines
1.1 KiB
Puppet

#
class cinder::volume::iscsi (
$iscsi_ip_address,
$volume_group = 'cinder-volumes',
$iscsi_helper = 'tgtadm'
) {
include cinder::params
cinder_config {
'DEFAULT/iscsi_ip_address': value => $iscsi_ip_address;
'DEFAULT/iscsi_helper': value => $iscsi_helper;
'DEFAULT/volume_group': value => $volume_group;
}
case $iscsi_helper {
'tgtadm': {
package { 'tgt':
name => $::cinder::params::tgt_package_name,
ensure => present,
}
if($::osfamily == 'RedHat') {
file_line { 'cinder include':
path => '/etc/tgt/targets.conf',
line => 'include /etc/cinder/volumes/*',
match => '#?include /',
require => Package['tgt'],
notify => Service['tgtd'],
}
}
service { 'tgtd':
name => $::cinder::params::tgt_service_name,
ensure => running,
enable => true,
require => Class['cinder::volume'],
}
}
default: {
fail("Unsupported iscsi helper: ${iscsi_helper}.")
}
}
}