Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-20 Thread Spriya
Hi, Do you have any sample script. ? On Thursday, November 20, 2014 11:04:43 AM UTC-5, Felix.Frank wrote: > > On 11/20/2014 03:54 PM, Spriya wrote: > > Hi, > > > > i made a custom fact, I am doing this because my manger wants an alert > > if the value doesnt match or changed by comparing wi

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-20 Thread Felix Frank
On 11/20/2014 03:54 PM, Spriya wrote: > Hi, > > i made a custom fact, I am doing this because my manger wants an alert > if the value doesnt match or changed by comparing with the external and > the values we are comparing with the facts should be from a txt file not > writing the values directly

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-20 Thread Spriya
Hi, i made a custom fact, I am doing this because my manger wants an alert if the value doesnt match or changed by comparing with the external and the values we are comparing with the facts should be from a txt file not writing the values directly in the .pp file Can you give me any suggestion

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-20 Thread Felix Frank
On 11/19/2014 05:36 PM, Spriya wrote: > Hi, > > Yes .txt can be on agent. > > The fact is already displayed on agent Yes, but is it a custom fact you made? Is it from some module? I get the feeling you might be over-engineering here. What is the source of the information in the text file? I f

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-19 Thread Ashish Jaiswal
Sorry, Was trying something.. A clear snippet. require 'facter' Facter.add(:is_javaversion) do setcode do a = File.readlines('javaversion.txt').map { |x| x.chomp }.join if Facter.value(:java_known_weblogic_version1) == a true else false

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-19 Thread Ashish Jaiswal
Hi, Just a quick hack. javaversion.rb require 'facter' Facter.add(:is_javaversion) do setcode do a = File.readlines('javaversion.txt').map { |x| x.chomp }.join if Facter.value(:java_known_weblogic_version1) == a true e

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-19 Thread Spriya
Hi, Yes .txt can be on agent. The fact is already displayed on agent Let me know On Wednesday, November 19, 2014 8:57:17 AM UTC-5, Felix.Frank wrote: > > Hi, > > so the .txt file is on the agent? > > Where is the fact from? > > On 11/18/2014 02:36 PM, Spriya wrote: > > Hi, > > > > I have

Re: [Puppet Users] how to compare facts using variables in a text file

2014-11-19 Thread Felix Frank
Hi, so the .txt file is on the agent? Where is the fact from? On 11/18/2014 02:36 PM, Spriya wrote: > Hi, > > I have a requirement how to compare facts using variables which are in a > txt file > > For example i have a facts > java_known_weblogic_version1 1.7.0_72 > > > I have txt file java

[Puppet Users] how to compare facts using variables in a text file

2014-11-18 Thread Spriya
Hi, I have a requirement how to compare facts using variables which are in a txt file For example i have a facts java_known_weblogic_version11.7.0_72 I have txt file javaversion.txt file 1.7.0_72 I want to comapare these files java_known_weblogic_version != javaversion.txt file? How can i d