Update packages role to better handle cent7 vs 8
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
---
|
||||
- name: Clean DNF cache
|
||||
become: true
|
||||
when: ansible_distribution == "Fedora" or ansible_distribution == "CentOS"
|
||||
when: ansible_distribution == "Fedora" or (ansible_distribution == "CentOS" and ansible_distribution_major_version == "8")
|
||||
shell:
|
||||
cmd: dnf clean all
|
||||
warn: false
|
||||
|
||||
- name: Clean YUM cache
|
||||
become: true
|
||||
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
|
||||
shell:
|
||||
cmd: yum clean all
|
||||
warn: false
|
||||
|
||||
Reference in New Issue
Block a user