Fixed yaml formating errors

This commit is contained in:
2025-08-13 09:16:44 +02:00
parent 99158ff5e8
commit 2f3f627c24

View File

@@ -0,0 +1,22 @@
- name: Get Upgrades
hosts: homelab
tasks:
- name: Get available Updates
ansible.builtin.shell:
cmd: apt update >/dev/null 2>/dev/null
- name: List available Updates
ansible.builtin.shell:
cmd: apt list --upgradable 2>/dev/null
- name: Get current date like dd-mm-yyyy
ansible.builtin.shell:
cmd: $date = date +%d-%m-%Y
- name: Install available Updates and write output log into ~\update_logs\update_log_($date)
ansible.builtin.shell:
cmd: apt upgrade -y > ~\updates_logs\update_log_$date
- name: Update Zabbix Text file
ansible.builtin.shell:
cmd: apt update >/dev/null 2>/dev/null && apt list --upgradable 2>/dev/null | wc -l > /home/Zabbix/available-packages.txt