Move swift::client to include from declared class
We need to be able to include swift::client multiple times in a given catalog. In order to ensure that we get the value of $swift::client_package_ensure, we change it to be the default in swift::client Change-Id: I65fb0736e9fa9e68c3c7877cf6caf228c49eb82d Related-bug: 1632143
This commit is contained in:
parent
ad6a7e4987
commit
4304c6e7bc
|
@ -9,14 +9,20 @@
|
|||
# Defaults to 'present'.
|
||||
#
|
||||
class swift::client (
|
||||
$ensure = 'present'
|
||||
$ensure = $::swift::client_package_ensure
|
||||
) {
|
||||
|
||||
if $ensure {
|
||||
$real_ensure = $ensure
|
||||
} else {
|
||||
$real_ensure = 'present'
|
||||
}
|
||||
|
||||
include ::swift::deps
|
||||
include ::swift::params
|
||||
|
||||
package { 'swiftclient':
|
||||
ensure => $ensure,
|
||||
ensure => $real_ensure,
|
||||
name => $::swift::params::client_package,
|
||||
tag => ['openstack','swift-support-package']
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ class swift(
|
|||
|
||||
include ::swift::deps
|
||||
include ::swift::params
|
||||
include ::swift::client
|
||||
|
||||
if ($swift_hash_path_prefix == undef and $swift_hash_path_suffix == undef) {
|
||||
fail('You must specify at least swift_hash_path_prefix or swift_hash_path_suffix')
|
||||
|
@ -71,10 +72,6 @@ class swift(
|
|||
}
|
||||
}
|
||||
|
||||
class { '::swift::client':
|
||||
ensure => $client_package_ensure;
|
||||
}
|
||||
|
||||
File {
|
||||
owner => 'swift',
|
||||
group => 'swift',
|
||||
|
|
Loading…
Reference in New Issue