mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
* 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.
This commit is contained in:
parent
345b6cdec8
commit
3247eec97a
3 changed files with 51 additions and 3 deletions
|
@ -464,10 +464,10 @@ class DnfModule(YumDnf):
|
|||
|
||||
def _ensure_dnf(self):
|
||||
if not HAS_DNF:
|
||||
if PY2:
|
||||
package = 'python2-dnf'
|
||||
else:
|
||||
if not PY2:
|
||||
package = 'python3-dnf'
|
||||
else:
|
||||
package = 'python2-dnf'
|
||||
|
||||
if self.module.check_mode:
|
||||
self.module.fail_json(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue