Skip to content

Commit

Permalink
do not enable ansible repo on el8
Browse files Browse the repository at this point in the history
we use ansible-core from baseos
  • Loading branch information
evgeni authored and upadhyeammit committed Jun 20, 2022
1 parent d709642 commit 3535253
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/foreman_maintain/concerns/downstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def rh_repos(server_version)
server_version_full = "#{server_version.major}.#{server_version.minor}"
rh_repos.concat(product_specific_repos(server_version_full))
if server_version > version('6.3')
rh_repos << ansible_repo(server_version)
ansible_repo = ansible_repo(server_version)
rh_repos << ansible_repo if ansible_repo
end

rh_repos
Expand All @@ -83,8 +84,6 @@ def ansible_repo(server_version)

if el7?
"rhel-#{el_major_version}-server-ansible-#{ansible_version}-rpms"
else
"ansible-#{ansible_version}-for-rhel-#{el_major_version}-x86_64-rpms"
end
end

Expand Down
5 changes: 2 additions & 3 deletions test/lib/concerns/downstream_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ module ForemanMaintain
system.send(:ansible_repo, system.version('6.9'))
end

it 'returns correct ansible 2.9 repo for 6.11 on el8' do
it 'returns no ansible 2.9 repo for 6.11 on el8' do
system.stubs(:el_major_version).returns(8)
assert_equal 'ansible-2.9-for-rhel-8-x86_64-rpms',
system.send(:ansible_repo, system.version('6.11'))
assert_nil system.send(:ansible_repo, system.version('6.11'))
end
end

Expand Down

0 comments on commit 3535253

Please sign in to comment.