---
- name: Update all Raspberry Pi hosts
  hosts: all_nodes
  become: true # Enables privilege escalation for a task or playbook, allowing it to run as another user (by default, root).
  tasks:
    - name: Update package cache
      ansible.builtin.apt:
        update_cache: yes

    - name: Upgrade all packages
      ansible.builtin.apt:
        upgrade: dist
