Refactor dpkg command task for improved clarity and reliability

This commit is contained in:
2026-05-01 02:29:53 +02:00
parent c6a760e26e
commit 7d5640f3bd

View File

@@ -19,11 +19,8 @@
raw: test -e /usr/bin/python3 || (apt -y update && apt install -y python3-apt)
- name: dpkg --configure -a
command: >
dpkg --configure -a
args:
warn: false
changed_when: _dpkg_configure.stdout_lines | length
ansible.builtin.command: dpkg --configure -a
changed_when: (_dpkg_configure.stdout | default('')) | length > 0
register: _dpkg_configure
when: apt_dpkg_configure|bool
tags:
@@ -44,4 +41,3 @@
state: "{{ apt_install_state }}"
tags:
- ansible-dependencies