-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuclalib_rhelupdate.yml
38 lines (35 loc) · 1.31 KB
/
uclalib_rhelupdate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
---
###############################################################################
# Playbook for RHEL OS Systems Patching
# -------------------------------------
#
# The ansible play is meant to be run against RHEL
# systems that do not require manual intervention
#
# The inventory.ini file contains a stanza titled
# [unattended_yum_update] containing servers that
# are OK to run an unattended yum update.
#
# The value of the serial parameter controls the "batch size" of servers to
# execute these tasks on at any given time during a run of the playbook.
#
# Sample command-line execution of this play is (assuming you are in the
# /etc/ansible directory):
#
# To run this play on unattended_yum_update hosts:
# ansible-playbook -i inventory.ini plays/uclalib_rhelupdate.yml -e rhel_inventory_host_group=unattended_yum_update -v
#
#
###############################################################################
- name: uclalib_rhelupdate.yml
hosts: "{{ rhel_inventory_host_group | default('unattended_yum_update') }}"
serial: "{{ rhelupdate_serial | default(20) }}"
any_errors_fatal: false
gather_facts: false
tasks:
- name: Execute RHEL yum update
yum:
name: "*"
state: latest # noqa: package-latest
security: "{{ ( security_only | default (false) ) | bool }}"
become: true