keyring: clean method to add a group

Add 'nova' and 'cinder' users to 'cephkeyring' group using a better way,
more "Puppetist"

Bug #402
This commit is contained in:
Emilien Macchi
2014-04-11 12:05:34 +02:00
parent 9c73677a19
commit 861acfc4cd
4 changed files with 2 additions and 14 deletions

View File

@@ -79,12 +79,7 @@ define cloud::volume::backend::rbd (
ensure_resource('group', 'cephkeyring', {
ensure => 'present'
})
# puppet-nova already manages 'cinder' user
# we just want to ensure cinder is part of the group.
ensure_resource('exec', 'add-cinder-to-cephkeyring-group', {
command => 'useradd -G cephkeyring cinder || true'
})
User<<| title == 'cinder' |>> { groups +> 'cephkeyring' }
ensure_resource('file', "/etc/ceph/ceph.client.${rbd_user}.keyring", {
owner => 'cephkeyring',