Ethan Paul
f1639dce1e
The overall config this will end up with is going to be nowhere near complicated enough to require the segmented structure of roles. A single directory of reusable tasks and resources will be much better
33 lines
1.1 KiB
YAML
33 lines
1.1 KiB
YAML
---
|
|
# Ansible Lint 403 ("Package installs should not use latest") is silenced here because
|
|
# it would defeat the point otherwise
|
|
- name: Upgrade Fedora and CentOS 8 packages # noqa: 403
|
|
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
|
|
become: true
|
|
dnf:
|
|
state: latest
|
|
name: "*"
|
|
exclude: "{{ ','.join(omni_pkg_exclude | default(['kernel*', 'docker-ce'])) }}"
|
|
|
|
- name: Upgrade CentOS 7 packages # noqa: 403
|
|
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
|
|
become: true
|
|
yum:
|
|
state: latest
|
|
name: "*"
|
|
exclude: "{{ ','.join(omni_pkg_exclude | default(['kernel*', 'docker-ce'])) }}"
|
|
|
|
- name: Upgrade Fedora packages # noqa: 403
|
|
when: ansible_distribution == "Fedora"
|
|
become: true
|
|
dnf:
|
|
state: latest
|
|
name: "*"
|
|
exclude: "{{ ','.join(omni_pkg_exclude | default(['kernel*', 'docker-ce'])) }}"
|
|
|
|
# Yeah I'll get here eventually
|
|
# - name: Upgrade APT packages
|
|
# when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
|
|
# become: true
|
|
# apt:
|