Hello Nikil,

Can you help me out in writing facts in ruby.?
Actually i want to run a command which is not working .

my code is :

require 'facter'
Facter.add(:xyz_version) do
  confine :kernel => "Linux"
  setcode do
    Facter::Core::Execution.execute('/bin/cat /var/xyz/installation.log |
/bin/grep "CCHIDS VERSION" | /bin/grep -o  "[0-9].[0-9]"')
  end
end

How i can rewrite in ruby?

On Thu, 31 Jan 2019, 18:18 Nikhil Patil <[email protected] wrote:

> Hi All,
>
> I have created the custom fact in ruby and placed in facterlib path on
> master. when i run facter -p on master i see the facter value in response.
> Now i want this to be pushed on all my agent from puppet master. how this
> can be achieved.
>
> Thanks & Regards
> Nikhil
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/f69c0165-5a41-45a5-a2b2-8837d7374a8c%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/f69c0165-5a41-45a5-a2b2-8837d7374a8c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CACeG0RT0fDjy1ni-rSgLC-iksXBgkDq0pk1-_J5E9SfVt1UULw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to