Skip to content

Use dnf allow_downgrade for openssl EL9 workaround#1964

Merged
zjhuntin merged 1 commit into
theforeman:masterfrom
zjhuntin:fix-openssl-fips-provider-downgrade
Jul 8, 2026
Merged

Use dnf allow_downgrade for openssl EL9 workaround#1964
zjhuntin merged 1 commit into
theforeman:masterfrom
zjhuntin:fix-openssl-fips-provider-downgrade

Conversation

@zjhuntin

@zjhuntin zjhuntin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

ansible.builtin.package with state: present won't downgrade when a newer version is already installed. Switch to ansible.builtin.dnf with allow_downgrade: true so the pinned NVRs actually replace the broken 3.5.7-1 packages.

@ehelms

ehelms commented Jul 8, 2026

Copy link
Copy Markdown
Member

Did you consider that the dnf module has a provision for downgrade? https://docs.ansible.com/projects/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-allow_downgrade

@zjhuntin

zjhuntin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@ehelms I did and tried it locally with that, but it failed 😦

@ehelms

ehelms commented Jul 8, 2026

Copy link
Copy Markdown
Member

This worked for me:

  tasks:
    - name: Downgrade openssl to an older version
      ansible.builtin.dnf:
        name: openssl-3.5.5-3.el9
        state: present
        allow_downgrade: yes                       

@zjhuntin

zjhuntin commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@ehelms my bad, it does work with that. I had tried it with all three packages and it did not work, with just the one that works, thanks!

Swap the task order: downgrade first using ansible.builtin.dnf with
allow_downgrade, then set excludepkgs to prevent update_os_packages
from pulling 3.5.7-1 back in. The previous order failed because the
excludes blocked depsolve during the downgrade.

Tested on a CentOS 9 Stream box with openssl 3.5.7-1 installed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@zjhuntin zjhuntin force-pushed the fix-openssl-fips-provider-downgrade branch from 67fda8f to f7c40fb Compare July 8, 2026 19:21
@zjhuntin zjhuntin merged commit 664e7d2 into theforeman:master Jul 8, 2026
7 of 8 checks passed
@zjhuntin zjhuntin deleted the fix-openssl-fips-provider-downgrade branch July 8, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants