Skip to content

Instantly share code, notes, and snippets.

@mrlesmithjr
Created February 14, 2020 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mrlesmithjr/0bc55ad12743bbdead4cfc89d834a27e to your computer and use it in GitHub Desktop.
Save mrlesmithjr/0bc55ad12743bbdead4cfc89d834a27e 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