-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathuclalib_rhelupdatedownload.yml
40 lines (37 loc) · 1.42 KB
/
uclalib_rhelupdatedownload.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
39
40
---
###############################################################################
# Playbook for RHEL OS Systems Patching
# -------------------------------------
#
# This ansible play is safe to be run against RHEL
# systems, regardless of manual intervention requirements.
#
# 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 rhelupdatedownload_serial parameter controls the
# "batch size" of servers to execute these tasks on at any given time during a
# run of the playbook. Defaults to 15.
#
# 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_rhelupdatedownload.yml -e rhel_inventory_host_group=unattended_yum_update -v
#
###############################################################################
- name: uclalib_rhelupdatedownload.yml
hosts: "{{ rhel_inventory_host_group | default('unattended_yum_update') }}"
serial: "{{ rhelupdatedownload_serial | default(15) }}"
any_errors_fatal: false
gather_facts: false
tasks:
- name: Download RHEL Updates
yum:
name: "*"
state: latest # noqa: package-latest
download_only: true
security: "{{ ( security_only | default (false) ) | bool }}"
update_cache: true
become: true