From 55a3dade37c62e12a1799b36595e71eefd15bb63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20=C5=BBbikowski?= Date: Tue, 11 Aug 2026 22:05:12 +0200 Subject: [PATCH] Update ansible/update.yml --- ansible/update.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ansible/update.yml b/ansible/update.yml index bbdbaea..2da6b5a 100644 --- a/ansible/update.yml +++ b/ansible/update.yml @@ -8,7 +8,9 @@ # DEBIAN / UBUNTU # ========================================== - name: Aktualizacja pakietów (Debian/Ubuntu) - when: ansible_os_family == 'Debian' + when: + - ansible_os_family == 'Debian' + - not (skip_apt | default(false)) block: - name: Aktualizacja pamięci podręcznej i podniesienie pakietów ansible.builtin.apt: @@ -30,7 +32,9 @@ # ALPINE LINUX # ========================================== - name: Aktualizacja pakietów (Alpine Linux) - when: ansible_os_family == 'Alpine' + when: + - ansible_os_family == 'Alpine' + - not (skip_apt | default(false)) block: - name: Aktualizacja pamięci podręcznej i pakietów (apk) community.general.apk: @@ -60,6 +64,6 @@ - name: Informacja o stanie po aktualizacji ansible.builtin.debug: msg: - - "Host: {{ inventory_hostname }} ({{ ansible_distribution }} {{ ansible_distribution_version }})" - - "Aktualizacja: ZAKOŃCZONA SUCCESS" - - "Status restartu: {{ '⚠️ WYMAGANY RESTART!' if reboot_needed | default(false) else '✅ Brak potrzeby restartu' }}" \ No newline at end of file + - "Host: {{ inventory_hostname }} ({{ ansible_distribution | default('N/A') }} {{ ansible_distribution_version | default('') }})" + - "Status: {{ '⏭️ POMINIĘTO (skip_apt = true)' if (skip_apt | default(false)) else '✅ ZAKOŃCZONO SUCCESS' }}" + - "Status restartu: {{ '⚠️ WYMAGANY RESTART!' if (reboot_needed | default(false)) else '✅ Brak potrzeby restartu' }}" \ No newline at end of file