Ensure list of packages to install is user customizable

There are hardcoded references to the 'ceph' package in the module but
the package isn't provided by the ceph.com repos anymore. This change
fixes the dependencies by referring them to ::ceph::params::packages instead

It also changes the type of the packages parameter to an array so that
multiple packages can be passed.

Change-Id: I13462219522386f8740b0d70916a44f3474115e4
Closes-Bug: 1630468
This commit is contained in:
Giulio Fidente 2016-10-05 09:26:12 +02:00
parent ad02bd9558
commit 3e8ebf5b52
2 changed files with 6 additions and 6 deletions

View File

@ -109,7 +109,7 @@ define ceph::key (
group => $group,
mode => $mode,
selinux_ignore_defaults => true,
require => Package['ceph'],
require => Package[$::ceph::params::packages],
}
}
@ -124,7 +124,7 @@ NEW_KEYRING=\$(mktemp)
ceph-authtool \$NEW_KEYRING --name '${name}' --add-key '${secret}' ${caps}
diff -N \$NEW_KEYRING ${keyring_path} | grep '<'
rm \$NEW_KEYRING",
require => [ Package['ceph'], File[$keyring_path], ],
require => [ File[$keyring_path], ],
logoutput => true,
}
@ -151,7 +151,7 @@ OLD_KEYRING=\$(mktemp)
ceph ${cluster_option} ${inject_id_option} ${inject_keyring_option} auth get ${name} -o \$OLD_KEYRING || true
diff -N \$OLD_KEYRING ${keyring_path} | grep '>'
rm \$OLD_KEYRING",
require => [ Package['ceph'], Exec["ceph-key-${name}"], ],
require => [ Class['ceph'], Exec["ceph-key-${name}"], ],
logoutput => true,
}

View File

@ -25,8 +25,8 @@
# [*exec_timeout*] The default exec resource timeout, in seconds
# Optional. Defaults to 600
#
# [*packages*] The ceph package name
# Optional. Defaults to 'ceph'
# [*packages*] The ceph package names
# Optional. Defaults to ['ceph']
#
# [*rgw_socket_path*] The socket path of the rados gateway
# Optional. Defaults to '/tmp/radosgw.sock'
@ -42,7 +42,7 @@
class ceph::params (
$exec_timeout = 600,
$packages = 'ceph', # just provide the minimum per default
$packages = ['ceph'], # just provide the minimum per default
$rgw_socket_path = '/tmp/radosgw.sock',
$enable_sig = false,
$release = 'jewel',