Aaron, thanks! That was the problem. I think I misread (or didn't read) the paragraph "Accessing variables" in the documentation. Thanks for helping me out with this.
On Wednesday, 4 November 2015 14:34:11 UTC+1, Aaron Russell wrote: > > 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/81bdcddd-95f9-4cd0-9d2d-00bfb30b35f8%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.