Enhanced configurability for python client configuration.
This commit is contained in:
parent
c944d55e0d
commit
1b36012d55
@ -2,6 +2,8 @@
|
||||
# This class contains the platform differences for keystone
|
||||
#
|
||||
class keystone::params {
|
||||
$client_package_name = 'python-keystone'
|
||||
|
||||
case $::osfamily {
|
||||
'Debian': {
|
||||
$package_name = 'keystone'
|
||||
|
@ -1,7 +1,11 @@
|
||||
class keystone::python {
|
||||
class keystone::python (
|
||||
$client_package_name = $::keystone::params::client_package_name,
|
||||
$ensure = 'present',
|
||||
) {
|
||||
|
||||
package { 'python-keystone' :
|
||||
ensure => present,
|
||||
name => $client_package_name,
|
||||
ensure => $ensure,
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,6 +6,12 @@ describe 'keystone::python' do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
it { should contain_package('python-keystone') }
|
||||
it { should contain_package('python-keystone').with_ensure("present") }
|
||||
|
||||
describe 'override ensure' do
|
||||
let(:params) { { :ensure => "latest" } }
|
||||
|
||||
it { should contain_package('python-keystone').with_ensure("latest") }
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user