ceph keys dependencies: use correct syntax for ensure_resource

This commit is contained in:
François Charlier 2014-07-24 16:30:41 +02:00
parent 84e8dbb3c2
commit 2aeb9c1992
2 changed files with 22 additions and 15 deletions

View File

@ -193,14 +193,19 @@ Host *
})
# Configure Ceph keyring
Ceph::Key <<| title == $cinder_rbd_user |>> ->
ensure_resource('file', "/etc/ceph/ceph.client.${cinder_rbd_user}.keyring", {
owner => 'root',
group => 'cephkeyring',
mode => '0440',
require => Ceph::Key[$cinder_rbd_user],
notify => Service['nova-compute'],
})
Ceph::Key <<| title == $cinder_rbd_user |>>
if defined(Ceph::Key[$cinder_rbd_user]) {
ensure_resource(
'file',
"/etc/ceph/ceph.client.${cinder_rbd_user}.keyring", {
owner => 'root',
group => 'cephkeyring',
mode => '0440',
require => Ceph::Key[$cinder_rbd_user],
notify => Service['nova-compute'],
}
)
}
Concat::Fragment <<| title == 'ceph-client-os' |>>
} else {

View File

@ -84,13 +84,15 @@ define cloud::volume::backend::rbd (
})
# Configure Ceph keyring
Ceph::Key <<| title == $rbd_user |>> ->
ensure_resource('file', "/etc/ceph/ceph.client.${rbd_user}.keyring", {
owner => 'root',
group => 'cephkeyring',
mode => '0440',
require => Ceph::Key[$rbd_user],
})
Ceph::Key <<| title == $rbd_user |>>
if defined(Ceph::Key[$rbd_user]) {
ensure_resource('file', "/etc/ceph/ceph.client.${rbd_user}.keyring", {
owner => 'root',
group => 'cephkeyring',
mode => '0440',
require => Ceph::Key[$rbd_user],
})
}
Concat::Fragment <<| title == 'ceph-client-os' |>>