Donovan, thanks for that. i\ downgraded my puppet server last night, but i'll get a test system up & running,
thanks again martin On Fri, Dec 17, 2010 at 6:38 AM, donavan <[email protected]> wrote: > On Dec 16, 10:51 am, boddiesdrinker <[email protected]> wrote: > > where can i get some template samples that use the function_ > > references? > > > > Many Thanks > > Martin > > I replied in the other thread. I think you're hitting a bug. But this > is a working template that calls a core function: > > <% value = scope.function_fqdn_rand(['10']) -%> > <%= "The random fqdn value is #{value}" %> > > And a more complex example that prints a list of lines suitable for / > etc/hosts: > > <%# returns a list of other puppet client fqdns %> > <% nodes = scope.function_list_nodes( ["{:classes => > 'puppet::client'}", "fqdn"] ) -%> > <% nodes.each do |fqdn| -%> > <%# lookup ipaddress and hostname of another client %> > <% ipaddr = scope.function_list_fact([fqdn, 'ipaddress']) -%> > <% hostname = scope.function_list_fact([fqdn, 'hostname']) -%> > <%= "#{ipaddr} #{fqdn} # {hostname}" %> > <% end -%> > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<puppet-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- "If we moved in next door, your lawn would die" Lemmy, Motorhead -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
