Skip to content

Commit

Permalink
cleanup unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Jan 1, 2024
1 parent b353fe5 commit d8c334b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 33 deletions.
22 changes: 2 additions & 20 deletions salt/freifunk/base/apt/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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:
Expand Down
6 changes: 2 additions & 4 deletions salt/freifunk/base/bmxd/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions salt/freifunk/base/devel.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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 #}
Expand Down
8 changes: 2 additions & 6 deletions salt/freifunk/base/uci/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d8c334b

Please sign in to comment.