From 502a00f53bbacbf4fdcc2ec73ccc2aaa5799563d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <Joerg.Sachse@slub-dresden.de>
Date: Mon, 14 Feb 2022 12:39:31 +0100
Subject: [PATCH] feat: add deactivated tasks for installing Linux Kernel
 Debugging symbols and tools

---
 tasks/install_debug_symbols.yml | 17 +++++++++++++++++
 tasks/main.yml                  |  5 +++++
 2 files changed, 22 insertions(+)
 create mode 100644 tasks/install_debug_symbols.yml

diff --git a/tasks/install_debug_symbols.yml b/tasks/install_debug_symbols.yml
new file mode 100644
index 0000000..85666bd
--- /dev/null
+++ b/tasks/install_debug_symbols.yml
@@ -0,0 +1,17 @@
+---
+# based on https://wiki.debian.org/HowToGetABacktrace
+
+- name: add package sources for debug symbols
+  apt-repository:
+    repo: "{{ item }}"
+  loop:
+    - "deb http://deb.debian.org/debian-debug/ buster-debug main"
+    - "deb http://deb.debian.org/debian-debug/ buster-proposed-updates-debug main"
+
+- name: install debug symbols and further tools
+  apt:
+    name: [
+      'linux-image-amd64-dbg',
+      'gdb',
+      'debian-goodies',
+    ]
diff --git a/tasks/main.yml b/tasks/main.yml
index d7b1f76..ee5909e 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -28,3 +28,8 @@
 - name: configure iptables
   import_tasks: "configure_iptables_external.yml"
   tags: [firewall, iptables]
+
+# only use if needed, this doesn't need to run everytime
+# - name: install kernel debug symbols
+#   import_tasks: "install_debug_symbols.yml"
+#   tags: [kernel, linux, debug, apt]
-- 
GitLab