Skip to content

Commit

Permalink
Update outdated packages on centos and oracle hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
shweta83 committed Jan 11, 2024
1 parent 73e1475 commit 21954ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/foreman/api/test_convert2rhel.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def centos(
"""Deploy and register Centos host"""
# updating centos packages on CentOS 8 is necessary for conversion
major = version.split('.')[0]
centos_host.execute('yum -y update')
if major == '8':
centos_host.execute('yum -y update centos-*')
repo_url = settings.repos.convert2rhel.convert_to_rhel_repo.format(major)
Expand Down Expand Up @@ -199,6 +200,7 @@ def oracle(
# disable rhn-client-tools because it obsoletes the subscription manager package
oracle_host.execute('echo "exclude=rhn-client-tools" >> /etc/yum.conf')
# install and set correct kernel, based on convert2rhel docs
oracle_host.execute('yum -y update')
result = oracle_host.execute(
'yum install -y kernel && '
'grubby --set-default /boot/vmlinuz-'
Expand Down

0 comments on commit 21954ff

Please sign in to comment.