--- - name: Fixture for no log password hosts: all tasks: - name: Fail when no_log is set to False ansible.builtin.user: name: john_doe password: "{{ item }}" state: absent with_items: - wow - now no_log: false - name: Fail when no_log is absent ansible.builtin.user: name: john_doe password: "{{ item }}" state: absent with_items: - wow - now