From e39d7a70896ef7fb774c75b8ee36c8ce71c4e418 Mon Sep 17 00:00:00 2001 From: Bruno Goncalves Date: Aug 14 2018 14:07:12 +0000 Subject: use python3 interpreter when running on Fedora --- diff --git a/roles/str-common-init/tasks/inspect.yml b/roles/str-common-init/tasks/inspect.yml index 1cfcc1f..9a8ecf9 100644 --- a/roles/str-common-init/tasks/inspect.yml +++ b/roles/str-common-init/tasks/inspect.yml @@ -26,10 +26,8 @@ ansible_distribution_version|int == 8 }} -# Fix python ansible interpreter when running on RHEL8. Currently RHEL8 -# uses python2, but it does miss some python2 modules, such as python2-dnf. -# This can be removed once RHEL8 uses by default Python3 +# Make sure to use python3 when running on RHEL8 and Fedora distributions. - name: Hardcode Python 3 interpreter for ansible modules set_fact: ansible_python_interpreter: /usr/bin/env python3 - when: is_rhel8_based + when: is_rhel8_based or distro_name == 'fedora'