- hosts: admin_pcs tasks: - name: install admin software become: yes dnf: name: "{{ item }}" state: present with_items: "{{ admin_software }}"