Update ansible/update.yml

This commit is contained in:
2026-08-11 22:05:12 +02:00
parent fa905e09dc
commit 55a3dade37

View File

@@ -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' }}"
- "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' }}"