--- - name: Adding user and self practice of automating an automation hosts: nodes vars_files: /tmp/list.yml tasks: - name: Real work account adding user: name: "{{ item }}" state: present with_items: "{{ username }}" ... # we use hash value loop only when there is key with multiple value and one is dependent on other key.