diff --git a/_grains/lsusb.py b/_grains/lsusb.py index c3a90fb..cc981a7 100644 --- a/_grains/lsusb.py +++ b/_grains/lsusb.py @@ -1,4 +1,5 @@ import re +import logging from subprocess import check_output log = logging.getLogger(__name__) diff --git a/salt/init.sls b/salt/init.sls index 05ae7d9..03de290 100644 --- a/salt/init.sls +++ b/salt/init.sls @@ -1,6 +1,6 @@ include: - salt.configs -{% if grains['osarch'].lower().startswith('arm') %} +{% if grains['osarch'].lower().startswith('arm') or grains['os'] == 'Fedora' %} - salt.pypi_install {% elif grains['os_family'] == 'Debian' %} - salt.deb_install diff --git a/setup.sh b/setup.sh index 6858f25..234fde8 100755 --- a/setup.sh +++ b/setup.sh @@ -45,8 +45,7 @@ read if ! [ -e /usr/bin/salt-call ]; then set -x - if [[ "$(uname -m)" =~ arm* ]]; then - echo -e "${CYAN}ARM processor detected - using pip/venv${NC}" + if [[ "$(uname -m)" =~ arm* ]] || [[ "$DISTRO" == "fedora" ]]; then [ -e /opt/saltstack/salt ] || python3 -m venv /opt/saltstack/salt /opt/saltstack/salt/bin/pip3 freeze | grep -q ^salt== ||