From 1310a1509dda70331a4f4589185c4278f46c530c Mon Sep 17 00:00:00 2001 From: svartis Date: Tue, 5 Apr 2022 04:44:38 +0200 Subject: [PATCH] Fixed issue with tasks not running on Debian Bullseye (#18) --- roles/raspberrypi/tasks/main.yml | 8 ++++++++ roles/raspberrypi/tasks/prereq/Raspbian.yml | 3 +++ 2 files changed, 11 insertions(+) diff --git a/roles/raspberrypi/tasks/main.yml b/roles/raspberrypi/tasks/main.yml index b80c91f..0e17964 100644 --- a/roles/raspberrypi/tasks/main.yml +++ b/roles/raspberrypi/tasks/main.yml @@ -39,6 +39,14 @@ when: - detected_distribution | default("") == "Raspbian" +- name: Set detected_distribution to Raspbian (ARM64 on Debian Bullseye) + set_fact: + detected_distribution: Raspbian + when: + - ansible_facts.architecture is search("aarch64") + - raspberry_pi|default(false) + - ansible_facts.lsb.description|default("") is match("Debian.*bullseye") + - name: execute OS related tasks on the Raspberry Pi include_tasks: "{{ item }}" with_first_found: diff --git a/roles/raspberrypi/tasks/prereq/Raspbian.yml b/roles/raspberrypi/tasks/prereq/Raspbian.yml index 42bfe7d..f6bc195 100644 --- a/roles/raspberrypi/tasks/prereq/Raspbian.yml +++ b/roles/raspberrypi/tasks/prereq/Raspbian.yml @@ -7,6 +7,9 @@ backrefs: true notify: reboot +- name: Install iptables + apt: name=iptables state=present + - name: Flush iptables before changing to iptables-legacy iptables: flush: true