Don't define virsh secret if already defined

We test to see if the ceph secret already has been defined before
installing the secret again.

This is mainly done to keep our Foreman runs clean, as it reports
on hosts that have had changes applied. Without the 'unless' clause
any node that has the nova compute class installed will report as
having changes applied.

Change-Id: I05e83f07570d4a0e67a700bd9d9030eef1c261c3
This commit is contained in:
Jens-Christian Fischer
2014-07-22 14:07:00 +02:00
parent 0ed5b7745b
commit 69b7a3c366

View File

@@ -77,6 +77,7 @@ class nova::compute::rbd (
exec { 'set-secret-value virsh':
command => "/usr/bin/virsh secret-set-value --secret $(cat /etc/nova/virsh.secret) --base64 $(ceph auth get-key ${rbd_keyring})",
unless => "/usr/bin/virsh secret-list | grep ${rbd_keyring}",
require => Exec['get-or-set virsh secret']
}