--- - hosts: localhost tasks: - name: with_sequence -> loop ansible.builtin.debug: msg: "{{ 'testuser%02x' | format(item) }}" loop: "{{ range(0, 4 + 1, 2)|list }}"