The remediation role is to assist in the remediation of a system. This role contains multiple playbooks that can be used to remediate a system for a specific inhibitors that are found during the pre-upgrade analysis.
IMPORTANT: Not all remediations are applicable to all upgrade paths, see the remediation variables list below.
Analysis role generates hostvars files for each node that runs pre-upgrade. It reads pre-upgrade reports and matches found inhibitors to available remediations.
analysis role creates the directory host_vars in the {{ leapp_workdir_controller }} directory.
It generates variable files that set the leapp_remediation_todo variable with available remediations for existing inhibitors, based on each node's pre-upgrade report.
The role also generates a remediate.yml playbook that you can use to run remediation for all nodes.
Use at your own risk! Note that remediations that this role provides example remediations for the very common scenarios. Some remediations can be destructive, some might not do what is needed exactly at your case. It is your responsibility to verify that what they do is suitable for your environment.
To run remediations generated by running the analysis role, complete the following steps:
-
After running the analysis role, view if it has generated any variables files at the
{{ leapp_workdir_controller }}directory:$ ls host_vars -
If yes, view the generated files and the variables that they set. Each variable represents a task file within this role's
tasksdirectory. View which tasks are suggested to be run to fix found inhibitors, modify to your needs or write new tasks if needed. -
Run the playbook
remediate.ymlthat the analysis role generated at the{{ leapp_workdir_controller }}directory:$ ansible-playbook -i <inventory> remediate.yml
| Name | Type | Default value | Description |
|---|---|---|---|
| leapp_report_location | String | "/var/log/leapp/leapp-report.json" | Location of the leapp report file. |
| leapp_remediation_playbooks | List | see Remediation playbooks | List of available remediation playbooks. |
| leapp_remediation_todo | List | [] | List of remediation playbooks to run. |
| leapp_reboot_timeout | Int | 7200 | Integer for maximum seconds to wait for reboot to complete. |
| leapp_pre_reboot_delay | Int | 60 | Integer to pass to the reboot pre_reboot_delay option. |
| leapp_post_reboot_delay | Int | 120 | Integer to pass to the reboot post_reboot_delay option. |
| leapp_remediate_ssh_password_auth | Boolean | true | Add "PasswordAuthentcation no" and "PermitRootLogin prohibit-password" to sshd config |
| leapp_system_roles_collection | String | "fedora.linux_system_roles" | Set which Ansible Collection to use for System Roles. For community/upstream, use "fedora.linux_system_roles". For the RHEL, AAP, use "redhat.rhel_system_roles". |
NOTE: If you use password authentication for Ansible (--user root --ask-pass), then setting leapp_remediate_ssh_password_auth: true
might lock out your Ansible session and the play will fail.
leapp_remediation_todo is a list of remediation playbooks to run. The list is empty by default. The list can be populated by the titles from Remediation playbooks section. For example:
leapp_remediation_todo:
- leapp_cifs_detected
- leapp_corrupted_grubenv_fileThe list of available remediation playbooks with their corresponding inhibitors titles:
leapp_cgroups-v1_enabled- RHEL 9 only
- Solves: cgroups-v1 enabled on the system
leapp_cifs_detected- Solves: Use of CIFS detected. Upgrade can't proceed. CIFS is currently not supported by the inplace upgrade.
leapp_corrupted_grubenv_file- Solves: Detected a corrupted grubenv file.
leapp_custom_network_scripts_detected- RHEL 8 Only
- Solves: custom network-scripts detected. RHEL 9 does not support the legacy network-scripts package that was deprecated in RHEL 8.
leapp_deprecated_sshd_directive- RHEL 8 Only
- Solves: A deprecated directive in the sshd configuration.
leapp_firewalld_allowzonedrifting- RHEL 8 Only
- Solves: Firewalld Configuration AllowZoneDrifting Is Unsupported.
leapp_firewalld_unsupported_tftp_client- RHEL 8 Only
- Solves: Firewalld Service tftp-client Is Unsupported.
leapp_legacy_network_configuration- RHEL 9 only
- Solves: Legacy network configuration found
leapp_loaded_removed_kernel_drivers- Solves: Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.
leapp_missing_efibootmgr- Solves: efibootmgr package is required on EFI systems.
leapp_missing_pkg- Solves: Leapp detected missing packages.
leapp_missing_yum_plugins- Solves: Required DNF plugins are not being loaded.
leapp_multiple_kernels- Solves: Multiple kernels installed. Requires reboot.
leapp_newest_kernel_not_in_use- Solves: Newest installed kernel not in use. Requires reboot.
leapp_nfs_detected- Solves: Use of NFS detected. Upgrade can't proceed.
leapp_non_persistent_partitions- Solves: Detected partitions mounted in a non-persistent fashion, preventing a successful in-place upgrade.
leapp_non_standard_openssl_config- RHEL 8 Only
- Solves: Non-standard configuration of openssl.cnf.
leapp_old_postgresql_data- Solves: Old PostgreSQL data found in
/var/lib/pgsql/data.
- Solves: Old PostgreSQL data found in
leapp_pam_tally2- RHEL 7 Only
- Solves: The pam_tally2 pam module(s) no longer available
leapp_partitions_with_noexec- Solves: Detected partitions mounted with the
noexecoption, preventing a successful in-place upgrade.
- Solves: Detected partitions mounted with the
leapp_relative_symlinks- Solves: Upgrade requires links in root directory to be relative
leapp_remote_using_root- RHEL 7 Only
- Solves: Possible problems with remote login using root account
leapp_rpms_with_rsa_sha1_detected- RHEL 8 Only
- Solves: Detected RPMs with RSA/SHA1 signature.
leapp_unavailable_kde- Solves: The installed KDE environment is unavailable on RHEL 8.
leapp_vdo_check_needed- RHEL 8 Only
- Solves: Cannot perform the VDO check of block devices.
See remediate.yml.
Peter Zdravecký, Ryan Bontreger
MIT