Skip to content

Yum update

Go to Automation

View in GitLab

Description

This playbook is designed to update yum packages on specified hosts and includes several tasks to ensure system stability and proper service management. It begins by registering Red Hat subscriptions if the distribution is RedHat. For eBesluitvorming nodes, it checks if 2 other Docker Swarm Nodes are ready before starting the maintenance. In such case, it drains Docker Swarm nodes and pauses for 10 minutes. It stops Nagios services on srvnagios hosts and upgrades all packages to their latest versions, clearing the cache if specified. The playbook then checks if a reboot is required based on the kernel version and, if so, stops logstash services for Elastic environments and reboots the target hosts.

After rebooting, it cleans rpm caches and restarts Nagios services. It also checks if FireMotD is installed and updates its cache if necessary. For eBesluitvorming nodes, it reactivates Docker Swarm nodes and pauses for another 10 minutes. The playbook handles specific Red Hat versions and ensures all services are properly managed during the update process, maintaining system stability and functionality.

Credentials

  • sys_ansible_local
  • Red Hat Corporate Account District09
  • Red Hat Enterprise Linux Server, Standard (Physical Nodes) subscription details

Input

Variable Description
packages Name of the packages to update default: *
state Packages state default: latest (check ansible.builtin.dnf module for details)
clearcache Clear yum cache before updating default: true
target FQDN name of the server or hostgroup to update

Output

None

Dependencies