mrjoshuap.leapp
ansible-leapp
This Ansible role automates the process of upgrading EL-based systems, mainly focusing on Red Hat Enterprise Linux.
It performs these main tasks:
- Checking prerequisites and requirements
- Preparing the system for the upgrade
- Creating a pre-upgrade report
- Fixing common upgrade issues (this option is off by default)
- Carrying out the upgrade (this option is off by default)
- Checking the system state after the upgrade (this option is off by default)
By default, this role will not carry out the actual upgrade. It's designed to prepare the system and generate a report that you should review. If you feel confident, you can also make it attempt the upgrade.
TODO
- Add verification steps after the upgrade (tasks/verify.yml)
References
I referred to these documents:
- Red Hat Download page
- Upgrading from RHEL 7 to RHEL 8
- Blog on upgrading RHEL 7 to RHEL 8
- Knowledgebase Article 1
- Knowledgebase Article 2
Role Variables
You can change how this role works by modifying variables in defaults/main.yml
.
# List of repository IDs in /etc/yum.repos.d
# Default []
leapp_custom_repositories: []
# Specify a grub device, usually not needed for most setups
leapp_grub_device: '/boot'
# Skip Red Hat Subscription Manager? Default no
leapp_skip_rhsm: no
# Skip validation checks? Default no
leapp_skip_validate: no
# Skip preparation tasks? Default no
leapp_skip_prepare: no
# Skip cockpit installation? Default no
leapp_skip_prepare_cockpit_install: no
# Skip package installation? Default no
leapp_skip_prepare_package_install: no
# Skip actual package updates? Default yes
leapp_skip_prepare_update: yes
# Skip reboot after package updates? Default no
leapp_skip_prepare_update_reboot: no
# Skip the pre-upgrade process? Default yes
leapp_skip_preupgrade: yes
# Skip cleaning up old reports? Default no
leapp_skip_preupgrade_cleanup: no
# Skip fixing common issues? Default yes
leapp_skip_remediate: yes
# Skip the actual upgrade? Default yes
leapp_skip_upgrade: yes
# Wait time (in seconds) for reboot after upgrade? Default 1200
leapp_reboot_timeout: 1200
Dependencies
You don't need any dependencies to use this role, but it assumes you have:
- Red Hat Enterprise Linux 7
- A system subscribed to RHSM or Satellite
- Repositories set up for the latest updates, especially for
rhel-7-server-rpms
andrhel-7-server-extras-rpms
Additionally, you'll need to download required data files (related to RPM changes and repository mapping) linked in the Knowledgebase Article and put them in the 'files' directory next to the playbook you are using.
Example Playbook
Here's a simple playbook that will carry out the default actions up to the actual upgrade:
---
- name: Perform an in-place upgrade of an EL System
hosts: all
become: yes
vars:
# List of repository IDs in /etc/yum.repos.d
# Default []
leapp_custom_repositories: []
# Skip Red Hat Subscription Manager? Default no
leapp_skip_rhsm: no
# Skip validation checks? Default no
leapp_skip_validate: no
# Skip preparation tasks? Default no
leapp_skip_prepare: no
# Skip cockpit installation? Default no
leapp_skip_prepare_cockpit_install: no
# Skip package installation? Default no
leapp_skip_prepare_package_install: no
# Skip actual package updates? Default yes
leapp_skip_prepare_update: yes
# Skip the pre-upgrade process? Default no
leapp_skip_preupgrade: no
# Skip cleaning up old reports? Default no
leapp_skip_preupgrade_cleanup: no
# Skip the actual upgrade? Default yes
leapp_skip_upgrade: yes
# Wait time (in seconds) for reboot after upgrade? Default 1200
leapp_reboot_timeout: 1200
roles:
- mrjoshuap.leapp
License
GPL-2.0-or-later
Author Information
Joshua Preston is a solution architect with Red Hat, focused on Platform and Management technologies.
An Ansible role that attempts an inplace upgrade of EL7 to EL8 using LEAPP
ansible-galaxy install mrjoshuap.leapp