From 434fe955ca810b42d68d7d73463f1de2449b4073 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Wed, 6 Apr 2022 21:06:02 +0200 Subject: [PATCH] Specify Raspbian playbook for Buster and below (#119) * Call Raspbian role only when Release is older than 11 (Bullseye) * Rename raspbian-role to mark that it is intended for Buster and lower Wireguard is directly supported by Raspbian 11 (Bullseye) and higher. * Add a note regarding the scope of the Raspbian playbook --- ...ebian-raspbian.yml => setup-debian-raspbian-buster.yml} | 6 ++++++ tasks/setup-debian.yml | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) rename tasks/{setup-debian-raspbian.yml => setup-debian-raspbian-buster.yml} (90%) diff --git a/tasks/setup-debian-raspbian.yml b/tasks/setup-debian-raspbian-buster.yml similarity index 90% rename from tasks/setup-debian-raspbian.yml rename to tasks/setup-debian-raspbian-buster.yml index 593966e..a687ea8 100644 --- a/tasks/setup-debian-raspbian.yml +++ b/tasks/setup-debian-raspbian-buster.yml @@ -2,6 +2,12 @@ # Copyright (C) 2020 Stefan Haun # SPDX-License-Identifier: GPL-3.0-or-later +# Note: This setup is called for Raspbian 10 (Buster) and lower. +# Since Raspbian 11 (Bullseye) wireguard is supported out +# of the box. +# Any Raspbian-related changes for Bullseye and above need to +# go to a separate playbook. + - name: (Raspbian) Install GPG - required to add WireGuard key ansible.builtin.apt: name: gnupg diff --git a/tasks/setup-debian.yml b/tasks/setup-debian.yml index 4af334c..3fe7ae2 100644 --- a/tasks/setup-debian.yml +++ b/tasks/setup-debian.yml @@ -5,11 +5,14 @@ - name: Setup for Raspbian ansible.builtin.include_tasks: - file: "setup-debian-raspbian.yml" + file: "setup-debian-raspbian-buster.yml" apply: tags: - wg-install - when: ansible_lsb.id is defined and ansible_lsb.id == "Raspbian" + when: + - ansible_lsb.id is defined + - ansible_lsb.id == "Raspbian" + - ansible_lsb.major_release is version('11', '<') register: wireguard__register_raspbian_setup - name: Setup for Proxmox VE variants