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/update.yml

26 lines
821 B
YAML
Raw Normal View History

---
- import_tasks: centos-8-dracut.yml
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
- name: Upgrade Fedora and CentOS 8 packages
when: (ansible_distribution == "CentOS" and ansible_distribution_major_version == "8") or ansible_distribution == "Fedora"
become: true
dnf:
state: latest
name: "*"
exclude: "{{ ','.join(exclude | default(['kernel*'])) }}"
- name: Upgrade CentOS 7 packages
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
become: true
yum:
state: latest
name: "*"
exclude: "{{ ','.join(exclude | default(['kernel*'])) }}"
# Yeah I'll get here eventually
# - name: Upgrade APT packages
# when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
# become: true
# apt: