RBD: enable or not key management

To have more flexibility in deployments, we have to add a new parameter
to enable or not RBD key management.
We can now declare the class for all servers and use Hiera to override
the value on the node which will manage the key generation.
This commit is contained in:
Emilien Macchi 2014-06-04 12:21:03 +02:00
parent 460e7ffe96
commit 2a1fb3bdd4

View File

@ -13,13 +13,17 @@
# License for the specific language governing permissions and limitations
# under the License.
#
class cloud::storage::rbd::key {
class cloud::storage::rbd::key (
$enabled = false
) {
if $enabled {
if !empty($::ceph_admin_key) {
@@ceph::key { 'admin':
secret => $::ceph_admin_key,
keyring_path => '/etc/ceph/keyring',
}
}
}
}