Fix calling extrepo

We should use the full path, not just "extrepo", otherwise, we get
a puppet error:

"failed: 'extrepo' is not qualified and no path was specified.
Please qualify the command or specify a path."

Change-Id: Iac40476e073f22bdb997b9f56824aa19d6f61505
This commit is contained in:
Thomas Goirand 2021-05-10 12:52:32 +02:00
parent 8dd6e0ea98
commit 3e39231478
2 changed files with 12 additions and 12 deletions

View File

@ -74,16 +74,16 @@ class openstack_extras::repo::debian::debian(
# external to this module that may also install extrepo.
ensure_packages(['extrepo',], {'ensure' => 'present'})
exec { "extrepo enable openstack_${lowercase_release}":
command => "extrepo enable openstack_${lowercase_release}",
logoutput => 'on_failure',
tries => 3,
try_sleep => 1,
refreshonly => true,
require => Package['extrepo'],
exec { "/usr/bin/extrepo enable openstack_${lowercase_release}":
command => "/usr/bin/extrepo enable openstack_${lowercase_release}",
logoutput => 'on_failure',
tries => 3,
try_sleep => 1,
require => Package['extrepo'],
creates => "/etc/apt/sources.list.d/extrepo_openstack_${lowercase_release}.sources",
}
if $package_require {
Exec["extrepo enable openstack_${lowercase_release}"] -> Exec['apt_update']
Exec["/usr/bin/extrepo enable openstack_${lowercase_release}"] -> Exec['apt_update']
}
}else{
exec { 'installing openstack-backports-archive-keyring':

View File

@ -23,8 +23,8 @@ describe 'openstack_extras::repo::debian::debian' do
end
context 'with default params' do
it { should contain_exec('extrepo enable openstack_victoria').with(
:command => 'extrepo enable openstack_victoria',
it { should contain_exec('/usr/bin/extrepo enable openstack_victoria').with(
:command => '/usr/bin/extrepo enable openstack_victoria',
)}
it { should contain_package('extrepo').with(
:ensure => 'present',
@ -39,8 +39,8 @@ describe 'openstack_extras::repo::debian::debian' do
:use_extrepo => true,
}
end
it { should contain_exec('extrepo enable openstack_wallaby').with(
:command => 'extrepo enable openstack_wallaby',
it { should contain_exec('/usr/bin/extrepo enable openstack_wallaby').with(
:command => '/usr/bin/extrepo enable openstack_wallaby',
)}
it { should contain_package('extrepo').with(
:ensure => 'present',