Similar statement in ansible - string as char value n times

hello masters,

Is there a simple way to create a variable like in the bash example?

export sep=$(printf ‘%0.1s’ “-”{1…100})

I would need to create a variable with 100 characters ‘-’ but I wanted it in an elegant way like in bash.

Just multiple the character you want, by the number of times you want it:

{{ “-” * 100 }}