diff options
author | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-16 20:06:17 +0100 |
---|---|---|
committer | clyhtsuriva <aimeric@adjutor.xyz> | 2025-02-16 20:06:17 +0100 |
commit | 8af7efa1e03c1d37cf34197249e487348d382d82 (patch) | |
tree | 70564ffd883d494c0d0ea69d43e9dcf4edc421a7 /ansible/roles | |
parent | fde2b4f0024c65efbab8cf3029bae6042e99f6da (diff) |
ansible: apt_update becomes update_system to handle apt & dnf updates
Using this opportunity to become role based
Diffstat (limited to 'ansible/roles')
-rw-r--r-- | ansible/roles/update_system/tasks/main.yml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ansible/roles/update_system/tasks/main.yml b/ansible/roles/update_system/tasks/main.yml new file mode 100644 index 0000000..6195d64 --- /dev/null +++ b/ansible/roles/update_system/tasks/main.yml @@ -0,0 +1,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" +... |