From 1808449946a0b75c8be64ffa3e74c3d5132e0239 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 4 Jun 2014 16:27:26 +0200 Subject: [PATCH] rbd/pools: support RH libvirt package name On Red Hat systems, libvirt package is not libvirt-bin. So we need to support both Debian & RH systems to manage RBD configuration. --- manifests/storage/rbd/pools.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/storage/rbd/pools.pp b/manifests/storage/rbd/pools.pp index e444c08a..9136dc6e 100644 --- a/manifests/storage/rbd/pools.pp +++ b/manifests/storage/rbd/pools.pp @@ -87,11 +87,17 @@ class cloud::storage::rbd::pools( tag => 'ceph_compute_secret_file', } + if $::osfamily == 'RedHat' { + $libvirt_package_name = 'libvirt' + } else { + $libvirt_package_name = 'libvirt-bin' + } + @@exec { 'get_or_set_virsh_secret': command => 'virsh secret-define --file /etc/ceph/secret.xml', unless => "virsh secret-list | tail -n +3 | cut -f1 -d' ' | grep -sq ${ceph_fsid}", tag => 'ceph_compute_get_secret', - require => [Package['libvirt-bin'],File['/etc/ceph/secret.xml']], + require => [Package[$libvirt_package_name],File['/etc/ceph/secret.xml']], notify => Exec['set_secret_value_virsh'], }