Skip to content

Add option to provide inline epp templates#1470

Open
jcpunk wants to merge 2 commits into
puppetlabs:mainfrom
jcpunk:inline-epp
Open

Add option to provide inline epp templates#1470
jcpunk wants to merge 2 commits into
puppetlabs:mainfrom
jcpunk:inline-epp

Conversation

@jcpunk

@jcpunk jcpunk commented Apr 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Provide a way to specify inline epp template.

Example use case:
I want to add a snippet like "profiles: <%= $profiles.join(',') %>". It feels a bit silly to build and deploy a separate template file when I just want such a simple template.

Additional Context

Add any additional context about the problem here.

  • Root cause and the steps to reproduce. (If applicable)
  • Thought process behind the implementation.

Related Issues (if any)

None

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

@jst-cyr

jst-cyr commented Jun 22, 2026

Copy link
Copy Markdown
Member

@jcpunk : Thanks for the PR! This looks like it could be helpful but am I correct in understanding this is a Developer Experience type of issue, correct? There is currently a way to accomplish this, but it is cumbersome for very simple changes?

I'm helping out with prioritization of PR reviews, so this type of info can help guide where it winds up sitting in the list.

My initial scan on the changes look like this is helpful and a minimal change, but it does seem like this type of change could introduce Hiera doing more code execution directly without proper validation.

Have you investigated an alternative that could avoid full code injection? Or what other safety/security considerations have been put in to ensure this is a safe introduction?

@jcpunk

jcpunk commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

This is indeed a developer experience issue. There is a silly workaround of making a "epptemplates" module I'm using to accomplish the same thing, but that results in having a mix of templates that don't have any obvious relationships.

I'm not worried for my workflows about any code injections, these are rendering templates...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants