hypervisor: use stdlib for cinder ceph key

To avoid resource dupplication errors in Puppet, we use here stdlib and
ensure_resource, to allow us to declare on the same node a Cinder volume
server with RBD driver and a compute using Ceph also.

Bug #402
This commit is contained in:
Emilien Macchi 2014-04-10 23:35:49 +02:00
parent 16f4132f67
commit 9a44bacecc

View File

@ -142,12 +142,13 @@ Host *
Exec <<| tag == 'set_secret_value_virsh' |>>
Ceph::Key <<| title == $cinder_rbd_user |>>
file { "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring":
ensure_resource('file', "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring", {
owner => 'nova',
group => 'nova',
mode => '0400',
require => Ceph::Key[$cinder_rbd_user]
}
require => "Ceph::Key[${cinder_rbd_user}]",
})
Concat::Fragment <<| title == 'ceph-client-os' |>>
} else {
$libvirt_disk_cachemodes_real = []