Hi,
I have now finished the work on "ARM-3 Puppet Templates" - the proposal
is here:
https://github.com/puppetlabs/armatures/blob/master/arm-3.puppet_templates/puppet_templates.md
There is also a full implementation available from my branch here:
https://github.com/hlindberg/puppet/tree/feature/master/templates
(this implementation also includes ARM-4 Heredoc).
In short Embedded Puppet Templates (EPP) is an ERB replacement that
works the same way as ERB, but the logic is written in the Puppet Language.
In addition the ERB tags <% %> <%- %->, <%=, <%#, <%% %%> the
implementation also support declaring required and optional parameters
(i.e. parameters with default values), and allows passing/setting named
arguments when evaluating the template.
You have seen templates before, but here is an epp template example:
$x = 'Puppet'
notice inline_epptemplate('Hello <%= $x %> Templates!')
You can comment on this ARM here, do a pull request to the armatures
repo, or comment directly on a commit.
If you want to try out the implementation, you need to pull it from my
branch (shown above) and then run with the setting --parser future
Regards
- henrik
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.