From 2a1fb3bdd404ce25b8f7af80d73f273500b29f00 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 4 Jun 2014 12:21:03 +0200 Subject: [PATCH] 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. --- manifests/storage/rbd/key.pp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/manifests/storage/rbd/key.pp b/manifests/storage/rbd/key.pp index 9d453c54..25c1cd2b 100644 --- a/manifests/storage/rbd/key.pp +++ b/manifests/storage/rbd/key.pp @@ -13,12 +13,16 @@ # 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 !empty($::ceph_admin_key) { - @@ceph::key { 'admin': - secret => $::ceph_admin_key, - keyring_path => '/etc/ceph/keyring', + if $enabled { + if !empty($::ceph_admin_key) { + @@ceph::key { 'admin': + secret => $::ceph_admin_key, + keyring_path => '/etc/ceph/keyring', + } } }