This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
omni-ansible/roles/packages/tasks/clean.yml

15 lines
391 B
YAML

---
- name: Clean DNF cache
become: true
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