#@ load("@ytt:template", "template")

#@ def tpl(val):
---
test: #@ val
#@ end

#@ def tpl2(val):
---
test1: #@ val
---
test2: #@ val+1
#@ end

#! add documents
#@ for i in range(0,3):
--- #@ template.replace(tpl(i))
#@ end

#! add multiple documents from docset
--- #@ template.replace(tpl2(123))
--- #@ template.replace(tpl2(456))

+++

test: 0
---
test: 1
---
test: 2
---
test1: 123
---
test2: 124
---
test1: 456
---
test2: 457
