From b1336705441e092a4291677cf885ffc6922e876c Mon Sep 17 00:00:00 2001
From: June <june@jsts.xyz>
Date: Tue, 18 Feb 2025 04:28:08 +0100
Subject: [PATCH] check(playbook): print all held packages

---
 playbooks/check.yaml | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/playbooks/check.yaml b/playbooks/check.yaml
index 63ea631..0945944 100644
--- a/playbooks/check.yaml
+++ b/playbooks/check.yaml
@@ -29,3 +29,14 @@
     - name: Print .dpkg-* files list
       ansible.builtin.debug:
         var: check__dpkg_files_list
+
+    - name: Get all held packages
+      ansible.builtin.command: apt-mark showhold
+      when: ansible_facts['pkg_mgr'] == "apt"
+      changed_when: false
+      register: check__apt_mark_showhold
+
+    - name: Print all held packages
+      ansible.builtin.debug:
+        var: check__apt_mark_showhold.stdout_lines
+      when: check__apt_mark_showhold.stdout_lines != []