Update packages role to better handle cent7 vs 8
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
---
|
||||
- import_tasks: centos-dracut.yml
|
||||
when: ansible_distribution == "CentOS"
|
||||
- import_tasks: centos-8-dracut.yml
|
||||
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
|
||||
|
||||
- name: Upgrade Fedora and CentOS packages
|
||||
when: ansible_distribution == "CentOS" or ansible_distribution == "Fedora"
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user