[Puppet-dev] Error: Could not retrieve local facts: undefined method `split' for [1, 2, 3, 4, 5]:Array

2014-10-10 Thread Supriya Uppalapati
Hi, when i am trying to do puppet custom facts to split [1,2,3,4,5] to 1 2 3 4 5 *It is throwing me error:* *Error: Could not retrieve local facts: undefined method `split' for [1, 2, 3, 4, 5]:Array* *Here is my facts* *require 'facter'ary = [1,2,3,4,5]ary.map { |i| "'" + i.to_s + "'"}.

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-09 Thread Supriya Uppalapati
executed in ruby it is showing me exact result what i need. But in the facts it is not returning any value. even though i removed puts and replaced log with line On Thu, Oct 9, 2014 at 11:08 AM, Andy Parker wrote: > On Thu, Oct 9, 2014 at 7:02 AM, Supriya Uppalapati < > supriya.uppalap...@

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-09 Thread Supriya Uppalapati
line|* * if line.include?('java')* * line_num += 1* * javaid, val = %x[#{log}]* *Facter.add("java_#{javaid}") do* * setcode do* * puts val* *end* * end* * end* Anyone please help me On Thursday, October 9, 2014 9:40:10 AM UTC-4, S

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-09 Thread Supriya Uppalapati
:012:4* puts val irb(main):013:4> end irb(main):014:3> puts val1 irb(main):015:3> end Let me know where i am doing mistake On Wed, Oct 8, 2014 at 8:18 PM, Andy Parker wrote: > On Wed, Oct 8, 2014 at 12:59 PM, Supriya Uppalapati < > supriya.uppalap...@gmail.com> wrote: > >

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-08 Thread Supriya Uppalapati
wrong here to get the out. I understood the factname and the output of the factname should be different. But it is not showing any output when the running the command itself. Help me On Wednesday, October 8, 2014 3:45:23 PM UTC-4, Andy Parker wrote: > > On Wed, Oct 8, 2014 at 12:32 PM, Su

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-08 Thread Supriya Uppalapati
irb(main):010:1> val = %x{line} irb(main):011:1> val = %x{log} irb(main):012:1> val = %x{i} irb(main):013:1> value = %x['#{i} -version'] irb(main):014:1> val irb(main):015:1> Let me know On Wed, Oct 8, 2014 at 3:45 PM, Andy Parker wrote: > On Wed, Oct 8, 2014 a

Re: [Puppet-dev] how can i get each java version in each custom facts

2014-10-08 Thread Supriya Uppalapati
.add("java_#{javaid}") do* * setcode do* * val* Can you correct me? Thank You On Wed, Oct 8, 2014 at 3:26 PM, Andy Parker wrote: > On Wed, Oct 8, 2014 at 11:26 AM, Supriya Uppalapati < > supriya.uppalap...@gmail.com> wrote: > >> Hi All, >> >> I

[Puppet-dev] how can i get each java version in each custom facts

2014-10-08 Thread Supriya Uppalapati
Hi All, I am trying to get all the java versions and paths where it is located. I got all java_paths in a fact called java_path. Now i need those versions in each custom facts. I wrote a code but this not executing . Please help me *require 'rexml/document'* *require 'facter'* *Facter.add("j

Re: [Puppet-dev] how to comment and uncomment lines in a file with puppet

2014-07-24 Thread Supriya Uppalapati
g of the line.* *Please help me* On Wednesday, July 23, 2014 5:05:33 PM UTC-4, Spencer Krum wrote: > You could likely use the file_line resource from the stdlib module to do > this. > > > On Wed, Jul 23, 2014 at 11:51 AM, Supriya Uppalapati < > supriya.u...@gmail.com >

[Puppet-dev] how to comment and uncomment lines in a file with puppet

2014-07-23 Thread Supriya Uppalapati
Other recipients: Hi, I am trying the uncomment the lines in a file using augeas in puppet. But it is not commenting those lines. Here is the code which I have writen, augeas { "bash_profile": context => "/home/infauser/.bash_profile", changes => [ "set #comment 'ex Hi, I am trying the

[Puppet-dev] is there any way to audit the contents of a file using puppet

2014-05-30 Thread Supriya Uppalapati
Hi, is there any way to audit the content of a file using no-op in puppet. Help me. -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+unsubscr.