--- - name: Install multiple packages hosts: all become: true tasks: - name: Update apt cache ansible.builtin.apt: update_cache: yes cache_valid_time: 3600 # Cache für eine Stunde gültig - name: Install required packages ansible.builtin.apt: name: "{{ required_pkgs }}" state: present