diff --git a/manifests/compute/hypervisor.pp b/manifests/compute/hypervisor.pp index d147155a..0d2f5c48 100644 --- a/manifests/compute/hypervisor.pp +++ b/manifests/compute/hypervisor.pp @@ -147,6 +147,7 @@ Host * ensure_resource ('exec','add-nova-to-group', { 'command' => 'usermod -a -G cephkeyring nova', + 'path' => ['/usr/sbin', '/sbin'], 'unless' => 'groups nova | grep cephkeyring' }) diff --git a/manifests/volume/backend/rbd.pp b/manifests/volume/backend/rbd.pp index 38516612..7e48b957 100644 --- a/manifests/volume/backend/rbd.pp +++ b/manifests/volume/backend/rbd.pp @@ -82,7 +82,7 @@ define cloud::volume::backend::rbd ( ensure_resource ('exec','add-cinder-to-group', { 'command' => 'usermod -a -G cephkeyring cinder', - 'path' => ['/usr/bin', '/bin'], + 'path' => ['/usr/sbin', '/sbin'], 'unless' => 'groups cinder | grep cephkeyring' }) diff --git a/spec/classes/cloud_compute_hypervisor_spec.rb b/spec/classes/cloud_compute_hypervisor_spec.rb index a66f9f28..84a69340 100644 --- a/spec/classes/cloud_compute_hypervisor_spec.rb +++ b/spec/classes/cloud_compute_hypervisor_spec.rb @@ -239,7 +239,8 @@ describe 'cloud::compute::hypervisor' do should contain_group('cephkeyring').with(:ensure => 'present') should contain_exec('add-nova-to-group').with( :command => 'usermod -a -G cephkeyring nova', - :unless => 'groups nova | grep cephkeyring' + :unless => 'groups nova | grep cephkeyring', + :path => ['/usr/sbin', '/sbin'] ) end diff --git a/spec/classes/cloud_volume_storage_spec.rb b/spec/classes/cloud_volume_storage_spec.rb index 7c23202d..d13e6cd4 100644 --- a/spec/classes/cloud_volume_storage_spec.rb +++ b/spec/classes/cloud_volume_storage_spec.rb @@ -111,7 +111,7 @@ describe 'cloud::volume::storage' do should contain_group('cephkeyring').with(:ensure => 'present') should contain_exec('add-cinder-to-group').with( :command => 'usermod -a -G cephkeyring cinder', - :path => ['/usr/bin', '/bin'], + :path => ['/usr/sbin', '/sbin'], :unless => 'groups cinder | grep cephkeyring' ) end