blob: ed496f9941021c5b47a2d64a034b8ffc764b759a [file] [log] [blame]
---
- name: verify
block:
# Clean cache prior to refreshing
- name: Clean yum cache
command: yum clean all
args:
warn: false
# Refresh cache to ensure repo is reachable
- name: Update yum cache
yum:
update_cache: yes
state: latest
tags:
- skip_ansible_lint # Prevent '[403] Package installs should not use latest' ansible lint task rule
rescue:
- name: Fail if yum cache updating failed
fail:
msg: "Couldn't refresh yum cache, repositories not configured properly. Check ansible logs for details."
become: true