Skip to content

Commit

Permalink
update wireguard for deb12
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Jan 2, 2024
1 parent 9124e24 commit a735dfd
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
3 changes: 3 additions & 0 deletions salt/freifunk/base/clear_old_env.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ clean_old_vnstat:
/root/freifunk/vserver-base:
file.absent

/etc/apt/sources.list.d/wireguard.list
file.absent


/etc/apache2/sites-enabled/001-freifunk.conf:
file.absent:
Expand Down
28 changes: 21 additions & 7 deletions salt/freifunk/base/wireguard/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,37 @@
file.absent
{% endif %}
{# Debian Pin-Prio for unstable Repo #}
{% if grains['os'] == 'Debian' %}
{% if grains['os'] == 'Debian' and grains['oscodename'] == 'bookworm' %}
/etc/apt/sources.list.d/debian_unstable.list:
file.absent
/etc/apt/preferences.d/limit-unstable
file.absent
wireguard_dkms:
pkg.removed:
- names:
- wireguard-dkms
- dkms
{% endif %}
{# Debian <12 Pin-Prio for unstable Repo #}
{% if grains['os'] == 'Debian' and not grains['oscodename'] == 'bookworm' %}
unstable_pkg_prio:
cmd.run:
- name: "printf 'Package: *\nPin: release a=unstable\nPin-Priority: 90\n' > /etc/apt/preferences.d/limit-unstable"
- unless: "[ -f /etc/apt/preferences.d/limit-unstable ]"
{% endif %}
wireguard:
{% if grains['os'] == 'Debian' %}
{% if grains['os'] == 'Debian' and not grains['oscodename'] == 'bookworm' %}
pkgrepo.managed:
- humanname: Wireguard
- humanname: debian-unstable
- name: deb http://deb.debian.org/debian/ unstable main
- dist: unstable
- file: /etc/apt/sources.list.d/wireguard.list
- unless: "[ -f /etc/apt/sources.list.d/wireguard.list ]"
- file: /etc/apt/sources.list.d/debian_unstable.list
- unless: "[ -f /etc/apt/sources.list.d/debian_unstable.list ]"
{% endif %}
pkg.installed:
Expand Down Expand Up @@ -127,4 +142,3 @@ wgvpn1_service_dead:
- require:
- pkg: wireguard
- file: /etc/config/ffdd
- file: /etc/config/ffdd_sample

0 comments on commit a735dfd

Please sign in to comment.