Is there any way to repeat same text block in template X times? For example, I need to generate template with hosts names and a block of text.
Host1
A lot of text
.
.
HostX
A lot of text
Is there any way to repeat same text block in template X times? For example, I need to generate template with hosts names and a block of text.
Host1
A lot of text
.
.
HostX
A lot of text
Use an
each
loop in your template:You can use any normal Ruby flow control stuffs in Erb templates.