Ahhh excellent, I can make this even better then.. -----Original Message----- From: "Stephen Marlow" <tega...@gmail.com> Sent: 5/14/2015 8:31 PM To: "puppet-users@googlegroups.com" <puppet-users@googlegroups.com> Subject: Re: [Puppet Users] Re: ok.. I am going crazy,,
For what it's worth, variables with a value of undef will be nil in templates. You can use the .nil? method to check them, so you don't need to make a test variable there. Additionally, you should refer to variables in templates with an @, such as @gemfire_users instead of gemfire_users. Here's a link to the doc, if you're interested: https://docs.puppetlabs.com/guides/templating.html#referencing-variables . On Thu, May 14, 2015 at 7:04 PM, ivan roseland <icrosel...@gmail.com> wrote: yes, crazy,, "sys_gemfirexd::gemfire_users": [ { "name": "XXXXXXXX", "password": "password_123" } ], <% if gemfire_users_test != "undef" -%> <% gemfire_users.each do |gemfire_users| -%> <%= gemfire_users['name'] -%>=<%= gemfire_users['password']%> <% end -%> <% end -%> and now.. gemfirexd.user.test=XXXXXXXX much better.. -- 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/8798a62d-e1d1-4dfe-a527-9b49f8bf8f6a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/4-4C26gghy4/unsubscribe. To unsubscribe from this group and all its topics, 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/CALGSqjJri75JmnrH_Zmscz7AMvUXP7ro_4s14mj%3DNO3d4MfzRA%40mail.gmail.com. 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/55556f16.66f1440a.2b4b.1179%40mx.google.com. For more options, visit https://groups.google.com/d/optout.