Re: [Puppet Users] Re: custom function to read inifile

2014-08-04 Thread Ritesh Nanda
Sorry for the question it worked , it was a typo . On Mon, Aug 4, 2014 at 12:15 PM, Ritesh Nanda wrote: > Hello , > > In this custom function i am trying to download a file and then parse it , > that works correctly , now i want the url value to be in a variable or > hiera and this custom funct

[Puppet Users] Re: custom function to read inifile

2014-08-04 Thread Ritesh Nanda
Hello , In this custom function i am trying to download a file and then parse it , that works correctly , now i want the url value to be in a variable or hiera and this custom function fetches that value from variable. Using lookupvar doesn't works . Below is the code and error. require_relativ

Re: [Puppet Users] Re: custom function to read inifile

2014-07-30 Thread Ritesh Nanda
Thanks Jason , i had that thing in mind , i made it part of the function itself to download the file and then read it . Thanks for the concern. Regards, Ritesh On Wed, Jul 30, 2014 at 5:37 AM, Jason Antman wrote: > Before you get any further, you do understand that the inifile has to be > on

Re: [Puppet Users] Re: custom function to read inifile

2014-07-30 Thread Jason Antman
Before you get any further, you do understand that the inifile has to be on the *master*, right? Just checking, because I've seen a lot of people trying to write functions, and only later realizing that the data they want is on the node, not the master. When I've come up with issues like this (mai

Re: [Puppet Users] Re: custom function to read inifile

2014-07-23 Thread Ritesh Nanda
Craig , i looked at that module puppetlabs-inifile, it allows to change the settings in ini file , i want to read/parse a ini file , assign a value to a variable. @henrik you were correct problem was with iniFile.load class . Now the functions looks like require_relative 'inifile' *This allows

[Puppet Users] Re: custom function to read inifile

2014-07-23 Thread Craig Barr
Does this meet your use case? On Wednesday, 23 July 2014 07:36:45 UTC+10, Ritesh Nanda wrote: > > Hello , > > I was trying to write a custom function which would run on puppet master > take input a ini file , parse a section of that ini file and