This repository has been archived on 2025-08-25. You can view files and clone it, but cannot push or open issues or pull requests.
Files
homelab/Ansible/apt_upgrade.yml

14 lines
316 B
YAML

- name: Upgrade packages
hosts: ubuntu
become: true
tasks:
- name: Update cache
ansible.builtin.apt:
update_cache: true
register: cache_updated
- name: Upgrade packages if something is changed
ansible.builtin.apt:
upgrade: "yes"
when: cache_updated.changed