storage: fix ceph compute secrets execs

This commit is contained in:
Sebastien Badia
2014-01-08 14:04:14 +01:00
parent 3e5a46c0dc
commit a6edcc73d6
2 changed files with 11 additions and 11 deletions

View File

@@ -20,8 +20,8 @@ class privatecloud::storage::compute(
if $has_ceph {
File <<| tag == 'ceph_compute_secret_file' |>>
Exec <<| tag == 'get-or-set virsh secret' |>>
Exec <<| tag == 'set-secret-value virsh' |>>
Exec <<| tag == 'get_or_set_virsh_secret' |>>
Exec <<| tag == 'set_secret_value_virsh' |>>
}

View File

@@ -75,19 +75,19 @@ osd 'allow class-read object_prefix rbd_children, allow rwx pool=${glance_pool},
tag => 'ceph_compute_secret_file',
}
@@exec { 'get-or-set virsh secret':
@@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-bin'],File['/etc/ceph/secret.xml']],
notify => Exec['set_secret_value_virsh'],
}
@@exec { 'set-secret-value virsh':
command => "virsh secret-set-value --secret ${ceph_fsid} --base64 ${::ceph_keyring_glance}",
tag => 'ceph_compute_set_secret',
require => [ Exec['get-or-set virsh secret'] ],
@@exec { 'set_secret_value_virsh':
command => "virsh secret-set-value --secret ${ceph_fsid} --base64 ${::ceph_keyring_glance}",
tag => 'ceph_compute_set_secret',
refreshonly => true,
}
}
}
} # if setup pools
} # class