2023-07-13 15:45:28 +02:00
|
|
|
---
|
|
|
|
- name: Update and upgrade apt packages
|
2024-03-03 15:59:49 +01:00
|
|
|
hosts: all
|
2024-03-03 16:34:29 +01:00
|
|
|
|
2023-07-13 15:45:28 +02:00
|
|
|
tasks:
|
|
|
|
- name: Update packages with apt
|
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.apt:
|
2024-03-03 16:16:22 +01:00
|
|
|
update_cache: true
|
2023-07-13 15:45:28 +02:00
|
|
|
|
|
|
|
- name: Update packages with yum
|
|
|
|
when: ansible_pkg_mgr == 'yum'
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.yum:
|
2023-07-13 15:45:28 +02:00
|
|
|
name: '*'
|
2024-03-03 17:36:01 +01:00
|
|
|
state: latest # noqa: package-latest
|
2023-07-13 15:45:28 +02:00
|
|
|
|
|
|
|
- name: Upgrade packages with apt
|
|
|
|
when: ansible_pkg_mgr == 'apt'
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.apt:
|
2023-07-13 15:45:28 +02:00
|
|
|
upgrade: dist
|
|
|
|
|
|
|
|
- name: Upgrade packages with yum
|
|
|
|
when: ansible_pkg_mgr == 'yum'
|
2024-02-24 11:56:25 +01:00
|
|
|
ansible.builtin.yum:
|
2023-07-13 15:45:28 +02:00
|
|
|
name: '*'
|
2024-03-03 17:36:01 +01:00
|
|
|
state: latest # noqa: package-latest
|
2024-02-22 19:01:59 +01:00
|
|
|
exclude: kernel*
|