multipart template does not keep variables
Author: aqueosCreated Sep 21, 2025Updated Sep 21, 2025
Labelsbug
Describe the Bug
when you create a template from xxx template files, a variable created in one part of it is not usable in the others
Expected Behavior
template('file1','file2','file3');
if file1 define variable="ok"
in file 3 you cannot use the variable.
Steps to Reproduce
Create a template
file1 <% myvar='ok' %>
file2 xwhaterver
file3 <%= myvar %>
template('file1','file2','file3') =>> fail
Environment
- Version puppet 7
- Platform deban12
Source: puppetlabs/puppet