Skip to content

Instantly share code, notes, and snippets.

@fgeorgatos
Forked from mrlesmithjr/patch_rhel.yml
Created April 30, 2020 15:23
Show Gist options
  • Save fgeorgatos/8b69206282dc807ccf20a5201855f6c3 to your computer and use it in GitHub Desktop.
Save fgeorgatos/8b69206282dc807ccf20a5201855f6c3 to your computer and use it in GitHub Desktop.
---
- hosts: rhel6
tasks:
- include_role:
name: yum_clean_all
- include_role:
name: yum_makecache
- include_role:
name: yum_check_update
- include_role:
name: yum_download_only
- block:
- include_role:
name: yum_update
- include_role:
name: yum_clean_all
when:
- yum_download_only is defined
- yum_download_only.stdout.find('No packages marked for updates') == -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment