Include /etc/cinder/volumes/ in tgt targets.conf
This config isn't included in the RHEL packages
This commit is contained in:
parent
bd9853a2bf
commit
c4f4a30922
@ -19,6 +19,17 @@ class cinder::volume::iscsi (
|
||||
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,
|
||||
|
@ -28,4 +28,21 @@ describe 'cinder::volume::iscsi' do
|
||||
|
||||
end
|
||||
|
||||
describe 'with RedHat' do
|
||||
|
||||
let :params do
|
||||
req_params
|
||||
end
|
||||
|
||||
let :facts do
|
||||
{:osfamily => 'RedHat'}
|
||||
end
|
||||
|
||||
it { should contain_file_line('cinder include').with(
|
||||
:line => 'include /etc/cinder/volumes/*',
|
||||
:path => '/etc/tgt/targets.conf'
|
||||
) }
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user