--- - name: install core packages for virtual machines hosts: "{{ my_hosts | d([]) }}" become: yes tasks: - name: install packages ansible.builtin.apt: name: - prometheus-node-exporter - nfs-common - qemu-guest-agent update_cache: yes - name: start guest qemu-guest-agent ansible.builtin.service: name: qemu-guest-agent state: started enabled: yes