Deliver the file you want to read via puppet (make sure you require the file resource in the one that uses the template). Probably still more optimal to use extlookup tho...
I believe its documented on the puppetlabs site but if not google it and I'm sure you'll find something :) On Apr 8, 2011 4:11 PM, "Mohamed Lrhazi" <lrh...@gmail.com> wrote: > Managed to get te cdw from the template, it is set to: /var/www/puppet/rack > I guess it would not be a good idea to store mt data files in such a > directory, would it? > > any pointers to extlookup is documented? or where in the code to look? > > thanks a lot. > > > On Fri, Apr 8, 2011 at 6:56 PM, Mohamed Lrhazi <lrh...@gmail.com> wrote: >> My File.new('./legacy.hosts.list') fails to find the file, which I >> put in the same place as the template itself. >> >> Is extlookup documented in puppetlabs docs? I cant locate it... Thanks a lot. >> >> >> On Fri, Apr 8, 2011 at 6:42 PM, Scott Smith <sc...@ohlol.net> wrote: >>> It's ruby, you can do whatever ruby allows. >>> >>> A better solution might be to use extlookup, though. >>> >>> On Apr 8, 2011 3:34 PM, "Mohamed Lrhazi" <lrh...@gmail.com> wrote: >>>> I have some logic I need in a template, and it needs to use a somewhat >>>> long list og hostnames I'd rather keep in a text file, instead of >>>> inside the template. >>>> >>>> Can I open files from a template and if so, what would the path be? >>>> would "./list.txt" mean same path as where the template itself is >>>> located? >>>> >>>> Thanks a lot. >>>> Mohamed. >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Puppet Users" group. >>>> To post to this group, send email to puppet-users@googlegroups.com. >>>> To unsubscribe from this group, send email to >>>> puppet-users+unsubscr...@googlegroups.com. >>>> For more options, visit this group at >>>> http://groups.google.com/group/puppet-users?hl=en. >>>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Puppet Users" group. >>> To post to this group, send email to puppet-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> puppet-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/puppet-users?hl=en. >>> >> > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.