On 05/22/2016 06:22 PM, Henrik Lindberg wrote:
On 23/05/16 03:07, David Karr wrote:
On Sunday, May 22, 2016 at 5:37:22 PM UTC-7, Henrik Lindberg wrote:
On 23/05/16 02:26, David Karr wrote:
> In "Learning Puppet 4", there are a couple of variations of calls
to the
> "epp" function. Some of them use the syntax that I find in the
actual
> Puppet docs, which is just "<module>/<file>.epp", but some of them
use
> something that looks more like a URI, like
> "puppet:///<module>/<file>.epp". I've determined that the former
is the
> only syntax that Puppet 4 accepts, unless I'm missing some
configuration
> option. Did Puppet ever use the "puppet:///<module>/<file>.epp"
syntax,
> and if so, what was the history of that going away?
>
It would be great if you could include pointers to where the
different
notations can be found.
You mean within the book? If that's what you mean, I can provide
approximate search locations, but I'm reading the book on Safari, so I
don't have page numbers.
Duh, book - I did not read carefully enough. :-) I though you found
examples in the puppet documentation or puppet site.
I had a feeling there was some confusion there. :) I had earlier found
the official doc page (that you reference below), and it references the
"<module>/<file>.epp" syntax, which is the only one I found to work. I
did report this in the book errata list, if it matters.
By your lack of an answer to my original actual question, I'm guessing
you know of no ancient Puppet implementation history where the
"puppet:///<module>/<file>.epp" syntax was valid? Although the syntax as
described this way in the book obviously doesn't work in Puppet 4 (and
the docs are consistent with that), I find it hard to believe the author
came up with this syntax on a lark :) , which makes me think that this
used to be valid at some point in the past.
The first occurrence is where the "epp()" function syntax is first
mentioned, in chapter 13, section "Using Puppet EPP Templates". On this
page, it has two clear examples, one using the "<module>/<file>.epp"
form, and the other using the "puppet:///<module>/<file>.epp" form, and
the text that describes the required syntax only mentions the latter.
The next occurrence is in chapter 14, section "Calling Other Modules",
and this example uses the "puppet:///<module>/<file>.epp" syntax.
I believe these are the only locations within the book that talk about
the syntax of the argument to the "epp()" function.
IIRC, the implementation of EPP use the same resolution to find a
template as the ERB template support does, so some investigation is
needed to find the real answer. The documentation / examples may
be in
error too.
The book indicated that the ERB template syntax uses
"<module>/<file>.epp", but I didn't test that.
The official documentation is here:
https://docs.puppet.com/puppet/latest/reference/lang_template.html#referencing-files
Yup, found that already. Thanks.
- henrik
--
You received this message because you are subscribed to the Google
Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to puppet-users+unsubscr...@googlegroups.com
<mailto:puppet-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/9b00b220-6501-4209-827a-4368dacac105%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/9b00b220-6501-4209-827a-4368dacac105%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/57425DE8.30104%40gmail.com.
For more options, visit https://groups.google.com/d/optout.