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
2020-03-17 22:51:10 -04:00

15 lines
413 B
YAML

---
- name: Clean DNF cache
become: true
when: ansible_distribution == "Fedora" or (ansible_distribution == "CentOS" and ansible_distribution_major_version == "8")
command:
cmd: /usr/bin/dnf clean all
warn: false
- name: Clean YUM cache
become: true
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
command:
cmd: /usr/bin/yum clean all
warn: false