Files
ansible-collection/playbooks/misc/server-patch-playbook.yml
alexpolo1 a3b8959ca9 Initial collection structure
Migrated from legacy playbook repo into Ansible collection format:

Roles (171 total):
- common: 44 roles (fact gathering, SSH setup, utilities)
- configuration: 32 roles (system config, networking, satellite)
- provisioning: 16 roles (VMware, Azure, physical server deployment)
- security: 15 roles (OpenSCAP hardening, certificates, AD integration)
- monitoring: 12 roles (Zabbix, logging agents, metrics)
- networking: 12 roles (DNS, DHCP, network interfaces)
- satellite: 4 roles (Pulp/Satellite management)
- misc: 36 roles (various utilities)

Playbooks (159 total):
- provisioning: 14 playbooks
- azure: 13 playbooks
- configuration: 22 playbooks
- maintenance: 10 playbooks
- security: 10 playbooks
- monitoring: 9 playbooks
- vcenter: 6 playbooks
- networking: 7 playbooks
- misc: 65 playbooks
2026-06-27 21:48:22 +02:00

61 lines
1.9 KiB
YAML

---
- name: Server Patching
hosts: all
become: true
gather_facts: true
tasks:
- name: RHEL 9 Update System Packages
ansible.builtin.dnf:
name: '*'
state: latest
disablerepo: '*'
enablerepo:
- CORP_Microsoft_Products_for_RHEL_Microsoft_Products_for_RHEL9
- CORP_Zabbix_Zabbix_7_for_RHEL9
- rhel-9-for-x86_64-appstream-rpms
- rhel-9-for-x86_64-baseos-rpms
when: ansible_distribution_major_version == '9'
register: RHEL9_package_updates
- name: RHEL 8 Update System Packages
ansible.builtin.dnf:
name: '*'
state: latest
disablerepo: '*'
enablerepo:
- CORP_Microsoft_Products_for_RHEL_Microsoft_Products_for_RHEL8
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
- CORP_Zabbix_Zabbix_7_for_RHEL8
when: ansible_distribution_major_version == '8'
register: RHEL8_package_updates
- name: RHEL 7 Update System Packages
ansible.builtin.yum:
name: '*'
state: latest
disablerepo: '*'
enablerepo:
- rhel-7-server-rpms
- rhel-7-server-extras-rpms
- CORP_Zabbix_Zabbix_7_for_RHEL7
- CORP_Microsoft_Products_for_RHEL_Microsoft_Products_for_RHEL7
- rhel-7-server-optional-rpms
when: ansible_distribution_major_version == '7'
register: RHEL7_package_updates
- name: RHEL9 updatede packages
ansible.builtin.debug:
var: RHEL9_package_updates.results
when: ansible_distribution_major_version == '9'
- name: RHEL8 updatede packages
ansible.builtin.debug:
var: RHEL8_package_updates.results
when: ansible_distribution_major_version == '8'
- name: RHEL7 updatede packages
ansible.builtin.debug:
var: RHEL7_package_updates.results
when: ansible_distribution_major_version == '7'