2020-10-08 16:33:19 -05:00
|
|
|
---
|
|
|
|
# patching.yml
|
|
|
|
#
|
|
|
|
# Variables:
|
|
|
|
# - hosts: what hosts in the inventory to use
|
|
|
|
# - threads: how many to check in parallel
|
2022-04-19 12:01:03 -05:00
|
|
|
- hosts: "{{ hosts | default('managed') }}"
|
2020-10-08 16:33:19 -05:00
|
|
|
order: sorted
|
|
|
|
serial: "{{ threads | default('4') }}"
|
|
|
|
ignore_unreachable: true
|
|
|
|
vars:
|
|
|
|
ansible_become: no
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
- name: Check updates
|
|
|
|
yum:
|
|
|
|
list=updates
|
|
|
|
update_cache=true
|
|
|
|
ignore_errors: true
|
|
|
|
register: yumupdates
|
|
|
|
|
|
|
|
- name: Patching succeeded
|
|
|
|
ignore_errors: true
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
- yumupdates.results|length == 0
|
|
|
|
- df_output.stdout is search("rhel-7-server-rpms-nist")
|