--- - name: Update web servers hosts: all remote_user: root tasks: - name: Update all packages to their latest version ansible.builtin.apt: name: "*" state: latest update_cache: yes - name: Install a list of packages ansible.builtin.apt: pkg: - htop