From d8c334bc2d4554c36fa6a699cea0e1f88b347365 Mon Sep 17 00:00:00 2001 From: creme Date: Mon, 1 Jan 2024 18:36:05 +0100 Subject: [PATCH] cleanup unneeded code --- salt/freifunk/base/apt/init.sls | 22 ++-------------------- salt/freifunk/base/bmxd/init.sls | 6 ++---- salt/freifunk/base/devel.sls | 3 --- salt/freifunk/base/uci/init.sls | 8 ++------ 4 files changed, 6 insertions(+), 33 deletions(-) diff --git a/salt/freifunk/base/apt/init.sls b/salt/freifunk/base/apt/init.sls index ceaad086..c07bb081 100644 --- a/salt/freifunk/base/apt/init.sls +++ b/salt/freifunk/base/apt/init.sls @@ -6,29 +6,10 @@ apt: - apt - ca-certificates - unattended-upgrades -{% if grains['os'] == 'Debian' and not grains['oscodename'] == 'buster' %} - - apt-transport-https -{% endif %} {# sources.list #} -{% if grains['os'] == 'Debian' and grains['oscodename'] == 'buster' %} -/etc/apt/sources.list: - file.managed: - - contents: | - ##### Debian Main Repos ##### - deb http://deb.debian.org/debian/ buster main contrib non-free - deb-src http://deb.debian.org/debian/ buster main contrib non-free - # stable-updates - deb http://deb.debian.org/debian/ buster-updates main contrib non-free - deb-src http://deb.debian.org/debian/ buster-updates main contrib non-free - # security-updates - deb http://deb.debian.org/debian-security buster/updates main contrib non-free - deb-src http://deb.debian.org/debian-security buster/updates main contrib non-free - - user: root - - group: root - - mode: 644 -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} +{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} /etc/apt/sources.list: file.managed: - contents: | @@ -46,6 +27,7 @@ apt: - user: root - group: root - mode: 644 + {% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %} /etc/apt/sources.list: file.managed: diff --git a/salt/freifunk/base/bmxd/init.sls b/salt/freifunk/base/bmxd/init.sls index ecfd65ba..9e9cfc33 100644 --- a/salt/freifunk/base/bmxd/init.sls +++ b/salt/freifunk/base/bmxd/init.sls @@ -14,15 +14,13 @@ bmxd_pkg_removed: bmxd: pkg.installed: - sources: -{% if grains['os'] == 'Debian' and grains['oscodename'] == 'buster' %} - - bmxd: {{ freifunk_dl_url }}/debian10/bmxd-{{ bmxd_version }}-debian-buster-amd64.deb - -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} +{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} - bmxd: {{ freifunk_dl_url }}/debian11/bmxd-{{ bmxd_version }}-debian-bullseye-amd64.deb {% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %} - bmxd: {{ freifunk_dl_url }}/debian12/bmxd-{{ bmxd_version }}-debian-bookworm-amd64.deb + {% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'focal' %} - bmxd: {{ freifunk_dl_url }}/ubuntu20/bmxd-{{ bmxd_version }}-ubuntu-focal-amd64.deb diff --git a/salt/freifunk/base/devel.sls b/salt/freifunk/base/devel.sls index eb79ab00..0e146fb0 100644 --- a/salt/freifunk/base/devel.sls +++ b/salt/freifunk/base/devel.sls @@ -23,9 +23,6 @@ devel: {# dep. to build fastd2 #} - libmnl-dev -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'buster' %} - - libcurl4 - {% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} - libcurl4 {# dep. to build fastd2 #} diff --git a/salt/freifunk/base/uci/init.sls b/salt/freifunk/base/uci/init.sls index c4401d54..1d5c8cd5 100644 --- a/salt/freifunk/base/uci/init.sls +++ b/salt/freifunk/base/uci/init.sls @@ -34,12 +34,7 @@ uci: pkg.installed: - sources: -{% if grains['os'] == 'Debian' and grains['oscodename'] == 'buster' %} - - libubox: {{ freifunk_dl_url }}/debian10/libubox_{{ libubox_version }}_amd64.deb - - libuci: {{ freifunk_dl_url }}/debian10/libuci_{{ libuci_version }}_amd64.deb - - uci: {{ freifunk_dl_url }}/debian10/uci_{{ uci_version }}_amd64.deb - -{% elif grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} +{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bullseye' %} - libubox: {{ freifunk_dl_url }}/debian11/libubox_{{ libubox_version }}_amd64.deb - libuci: {{ freifunk_dl_url }}/debian11/libuci_{{ libuci_version }}_amd64.deb - uci: {{ freifunk_dl_url }}/debian11/uci_{{ uci_version }}_amd64.deb @@ -49,6 +44,7 @@ uci: - libuci: {{ freifunk_dl_url }}/debian12/libuci_{{ libuci_version }}_amd64.deb - uci: {{ freifunk_dl_url }}/debian12/uci_{{ uci_version }}_amd64.deb + {% elif grains['os'] == 'Ubuntu' and grains['oscodename'] == 'focal' %} - libubox: {{ freifunk_dl_url }}/ubuntu20/libubox_{{ libubox_version }}_amd64.deb - libuci: {{ freifunk_dl_url }}/ubuntu20/libuci_{{ libuci_version }}_amd64.deb