This commit is contained in:
admin_rb
2026-09-15 21:33:10 +02:00
parent 7c24c7ba7f
commit d095887d2e
118 changed files with 1655 additions and 21 deletions
+35
View File
@@ -0,0 +1,35 @@
---
- name: "Maintenance | Patch operating system"
hosts: all
gather_facts: true
tasks:
- name: "Debian | Update package cache and upgrade packages"
when: ansible_facts['os_family'] == 'Debian'
ansible.builtin.apt:
update_cache: true
upgrade: dist
- name: "RedHat | Upgrade installed packages"
when: ansible_facts['os_family'] == 'RedHat'
ansible.builtin.dnf:
name: '*'
state: latest
- name: "Windows | Install available updates"
when: ansible_facts['os_family'] == 'Windows'
ansible.windows.win_updates:
category_names:
- CriticalUpdates
- SecurityUpdates
- UpdateRollups
- Updates
reboot: false
register: windows_updates
- name: "Windows | Report reboot requirement"
when:
- ansible_facts['os_family'] == 'Windows'
- windows_updates.reboot_required | default(false)
ansible.builtin.debug:
msg: "Windows updates were installed and a reboot is required. No reboot was performed."