25 lines
633 B
YAML
25 lines
633 B
YAML
---
|
|
- hosts: all
|
|
name: Upgrade packages
|
|
tasks:
|
|
- name: Upgrade YUM packages
|
|
when: ansible_distribution == "CentOS"
|
|
become: true
|
|
yum:
|
|
state: latest
|
|
name: "*"
|
|
exclude: kernel*{{ ',' + exclude_upgrade | default('') }}
|
|
|
|
- name: Upgrade DNF packages
|
|
when: ansible_distribution == "Fedora"
|
|
become: true
|
|
dnf:
|
|
state: latest
|
|
name: "*"
|
|
exclude: kernel*{{ ',' + exclude_upgrade | default('') }}
|
|
|
|
# - name: Upgrade APT packages
|
|
# when: ansible_distribution == "Debian" or ansible_distribution == "Ubuntu"
|
|
# become: true
|
|
# apt:
|