blob: ed496f9941021c5b47a2d64a034b8ffc764b759a [file] [log] [blame]
Bartek Grzybowski4e2e9e82019-03-13 09:33:53 +01001---
2- name: verify
3 block:
4 # Clean cache prior to refreshing
5 - name: Clean yum cache
6 command: yum clean all
7 args:
8 warn: false
9 # Refresh cache to ensure repo is reachable
10 - name: Update yum cache
11 yum:
12 update_cache: yes
13 state: latest
14 tags:
15 - skip_ansible_lint # Prevent '[403] Package installs should not use latest' ansible lint task rule
16 rescue:
17 - name: Fail if yum cache updating failed
18 fail:
19 msg: "Couldn't refresh yum cache, repositories not configured properly. Check ansible logs for details."
20 become: true