aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/update_system/tasks/main.yml
blob: 6195d64f55c62d92733eb709c46dfb98c7728941 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Update and upgrade system packages (Debian-based)
  ansible.builtin.apt:
    update_cache: true
    upgrade: true
    autoremove: true
  when: ansible_pkg_mgr == "apt"

- name: Update and upgrade system packages (RedHat-based)
  ansible.builtin.dnf:
    update_cache: true
    name: "*"
    state: present
    autoremove: true
  when: ansible_pkg_mgr == "dnf"
...