Skip to content

Commit

Permalink
fix: install needed deps. for salt-minion on debian 11
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Dec 2, 2024
1 parent bd25b46 commit 27abe9a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
15 changes: 11 additions & 4 deletions init_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ install_uci() {
PKGS=("$libubox" "$libuci" "$uci")
DIST="$1"

printf '\n### Install UCI ..\n'

for PKG in "${PKGS[@]}"; do
PKG_NAME="$(echo "$PKG" | cut -d'_' -f 1)"
PKG_VERSION="$(echo "$PKG" | cut -d'_' -f 2 | grep -o '[0-9]*')"
Expand Down Expand Up @@ -223,7 +225,6 @@ if [ "$os_id" = 'debian' ]; then
;;
*) print_not_supported_os ;;
esac
printf '\nOK.\n'
elif [ "$os_id" = 'ubuntu' ]; then
case "$version_id" in
20.04*) PKGMNGR='apt-get'
Expand All @@ -237,12 +238,13 @@ elif [ "$os_id" = 'ubuntu' ]; then
;;
*) print_not_supported_os ;;
esac
printf '\nOK.\n'
else
print_not_supported_os
fi
printf '\nOK.\n'

printf '\n### Install current Salt Sources ..\n'

printf '\n### Install Salt Sources ..\n'
check_salt_repo

printf '\n### Update System ..\n'
Expand All @@ -253,7 +255,12 @@ printf '\n'
printf '\n### Install Basic Software ..\n'
"$PKGMNGR" -y install git salt-minion

# run salt-minion only as masterless and also disable the service
# fix: install needed deps. for salt-minion on debian 11
if [ "$os_id" = 'debian' ] && [ "$version_id" = '11' ]; then
"$PKGMNGR" -y install python3-yaml python3-msgpack python3-distro python3-jinja2 python3-tornado python3-packaging python3-looseversion
fi

# disable salt-minion service
systemctl disable salt-minion ; systemctl stop salt-minion &


Expand Down
7 changes: 7 additions & 0 deletions salt/freifunk/base/install_pkg.sls
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ install_pkg:

{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %}
- python3-pip
- python3-yaml
- python3-msgpack
- python3-distro
- python3-jinja2
- python3-tornado
- python3-looseversion
- python3-packaging

{% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'focal' %}
- python-apt
Expand Down

0 comments on commit 27abe9a

Please sign in to comment.