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
> <https://groups.google.com/d/msgid/puppet-users/8798a62d-e1d1-4dfe-a527-9b49f8bf8f6a%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/CALGSqjJri75JmnrH_Zmscz7AMvUXP7ro_4s14mj%3DNO3d4MfzRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to