-
Notifications
You must be signed in to change notification settings - Fork 23.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python2_dnf is not available for Fedora 30 (rawhide) #49362
Comments
Hi @robertdebock, thank you for submitting this issue! |
Files identified in the description: If these files are inaccurate, please update the |
Ultimately I think the issue here is that Fedora is moving away from python2 and there's nothing Ansible can realistically do. |
…y over python2-dnf. (ansible#49402)" This reverts commit 3247eec.
…ython2-dnf. (ansible#49402) * Create python3and2 Adding tests to see if dnf still works when python-2 and python-3 are installed. * Update main.yml Include the tests that run on python 2 and python 3, based on the package manager. * Update dnf.py Use python3-dnf by default, otherwise python2-dnf. * Rename python3and2 to python3and2.yml Rename.
…y over python2-dnf. (ansible#49402)" (ansible#49633) This reverts commit 3247eec.
Python2 is loosing support next year so everybody is being forced to drop python2 support for everything. Why not just install python3-dnf instead of python2-dnf? |
@imp1sh the problem is that you are trying to run the dnf module with The dnf module can’t change interpreters as it is not in charge of that proves so you must do it yourself by either;
The latter option will be the new default in Ansible 2.12 but because it is a change in behaviour we had to have a deprecation period since it was introduced in Ansible 2.8. You can read more about python interpreter discovery here. |
SUMMARY
Fedora 30 (now rawhide, the unreleased development branch) will not offer python2-dnf anymore.
This causes a problem when installing
python2
on Fedora 30.ISSUE TYPE
COMPONENT NAME
dnf
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
Control node does not matter, I'm using Fedora 29.
Managed node: Fedora 30/rawhide
STEPS TO REPRODUCE
Start a fedora rawhide container:
Install python2 on it:
Install another package using the default
ansible_python_interpreter
:ansible \ -m dnf \ -a "name=sos" \ -i f9f2e079d337, \ -c docker \ all
Another way to test this: (could be used in the integration tests)
EXPECTED RESULTS
Just to have python2 installed, I'm not interested in python2-dnf.
I realize this an edge case, and fixing it may cause more issues, like #22305.
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: