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
ansible 2.7.1
config file = None
configured module search path = [u'/home/robertdb/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.15 (default, Oct 15 2018, 15:26:09) [GCC 8.2.1 20180801 (Red Hat 8.2.1-2)]
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:
docker run --rm fedora:rawhide sleep 300
Install python2 on it:
ansible \
-m dnf \
-a "name=python2" \
-i f9f2e079d337, \
-c docker \
-e "ansible_python_interpreter=/usr/bin/python3" \
all
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)
# INSTALLPYTHON2
# The module `dnf` tries to install python2-dnf when it's running on systems
# that have python2 installed. Fedora 30 and newer have python3 and limited
# support for python2, for example python2-dnf is missing.
- name: use python3
set_fact:
ansible_python_interpreter: /usr/bin/python3
- name: install python2
dnf:
name: python2
state: present
- name: use python2
set_fact:
ansible_python_interpreter: /usr/bin/python
- name: install a sample package
dnf:
name: python2
state: present
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
f9f2e079d337 | FAILED! => {
"changed": false,
"cmd": "dnf install -y python2-dnf",
"msg": "Error: Unable to find a match",
"rc": 1,
"stderr": "Error: Unable to find a match\n",
"stderr_lines": [
"Error: Unable to find a match"
],
"stdout": "Last metadata expiration check: 0:01:03 ago on Fri Nov 30 10:19:16 2018.\nNo match for argument: python2-dnf\n",
"stdout_lines": [
"Last metadata expiration check: 0:01:03 ago on Fri Nov 30 10:19:16 2018.",
"No match for argument: python2-dnf"
]
}
SUMMARY
Fedora 30 (now rawhide, the unreleased development branch) will not offer python2-dnf anymore.
This causes a problem when installing
python2on 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 \ allAnother 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