I ran into this problem also. 

Are you access the variable $xxx_yyy will full puppet path? IE 
$classname::xxx_yyy

If not you need to pass the variable into the template like this. 

content => epp('module/template.epp',  { 'xxx_yyy' => "$xxx_yyy"}),

Hope This helps
 

On Wednesday, November 4, 2015 at 8:24:59 AM UTC-5, Erwin Bogaard wrote:
>
> As epp is the way to go, I'm trying to create all my new templates in 
> epp-format.
> I have a problem with using conditionals, though.
>
> I have the following conditional in an epp template:
> ...
> <%- if $xxx_yyy == true { -%>
> // code here
> <%- } -%>
> ...
>
> When I apply this template with a defined type resource that sets:
> ...
>         xxx_yyy     => true,
> ...
>
> Nothing happens on that node.
> Just to test what the value is of $xxx_yyy, I added "Value variable: <%= 
> $xxx_yyy %>" to the templat, but that stays empty.
>
> I call the epp-template with:
>
> content => epp('module/template.epp'),
>
>
> If I copy the template to template.erb and modify the code as needed:
> ...
> <%- if @sug_saml_enable -%>
> // code here
> <%- end -%>
> ...
>
> All is working well when calling the template with:
>
> content => template('module/template.erb'),
>
>
> What am I doing wrong?
> Can someone point me in the right direction?
>
> This is with puppet-agent 4.2.3 and the newest puppetserver.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/c1c6ee87-9fb9-47e6-a7ba-e2be492b450b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to