Install nfs-ganesha in Debian/Ubuntu

The nfs-ganesha package is already available in these distros.

Change-Id: Ia4512f75a3bdf3e6207f11f5ceb0731c436bb5bd
This commit is contained in:
Takashi Kajinami 2023-01-16 10:26:19 +09:00
parent 2512341750
commit 6d2eeafde1
3 changed files with 14 additions and 20 deletions

View File

@ -83,12 +83,8 @@ define manila::backend::ganesha (
"${share_backend_name}/ganesha_rados_export_index": value => $ganesha_rados_export_index;
}
if ($::osfamily == 'RedHat') {
ensure_packages( 'nfs-ganesha', {
ensure => present,
tag => ['openstack', 'manila-support-package'],
})
} else {
warning("Unsupported osfamily ${::osfamily}, Red Hat is the only supported platform.")
}
ensure_packages( 'nfs-ganesha', {
ensure => present,
tag => ['openstack', 'manila-support-package'],
})
}

View File

@ -0,0 +1,5 @@
---
features:
- |
The ``manila::backend::ganesha`` defined resource type now supports Ubuntu
and Debian.

View File

@ -10,6 +10,11 @@ describe 'manila::backend::ganesha' do
{}
end
it { is_expected.to contain_package('nfs-ganesha').with(
:name => 'nfs-ganesha',
:ensure => 'installed'
) }
it 'set the default values' do
is_expected.to contain_manila_config('ganesha/ganesha_config_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_manila_config('ganesha/ganesha_config_path').with_value('<SERVICE DEFAULT>')
@ -48,15 +53,6 @@ describe 'manila::backend::ganesha' do
end
end
shared_examples_for 'manila::backend::ganesha on RedHat' do
let(:title) {'ganesha'}
it { is_expected.to contain_package('nfs-ganesha').with(
:name => 'nfs-ganesha',
:ensure => 'installed'
) }
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
@ -65,9 +61,6 @@ describe 'manila::backend::ganesha' do
facts.merge!(OSDefaults.get_facts({ :fqdn => 'some.host.tld'}))
end
it_configures 'manila::backend::ganesha'
if facts[:osfamily] == 'RedHat'
it_configures 'manila::backend::ganesha on RedHat'
end
end
end
end