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

{{ "-" * 100 }}

On Tue, Aug 22, 2023 at 3:52 PM Luiz Gustavo <[email protected]> wrote:

> 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f9243b89-e66d-4057-a68c-b5de3e2032bfn%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f9243b89-e66d-4057-a68c-b5de3e2032bfn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8-kPfCJW3QKpPJU2WgcHkDWJNxXt_WUk7u_SnPvdP6VA%40mail.gmail.com.

Reply via email to