add fact of command out

14 views
Skip to first unread message

Abhishek singh

unread,
Jan 31, 2019, 11:58:18 AM1/31/19
to Puppet Users
Hello Group,

My code was working in 2.7.X puppetserver version but it is not running on puppetmaster 3.8.7.

Facter version :
facter -v
1.7.5

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


please guide.

If these types of command can not be executed in this version of puppet, what is the other solutions/Alternatives.
Can it be done via ruby, please guide with some examples.

Regards,
Abhishek Singh

Abhishek singh

unread,
Jan 31, 2019, 3:12:49 PM1/31/19
to Puppet Users
Hello Group,

Please help me out.
Its really wierd, i have done every thing possible but the command is still not working.

Any simple facts like passing strings are working.


Regards,
Abhiahek Singh

--
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 puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6ae673c6-258f-4c38-8389-b880c7cbf37e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Abhishek singh

unread,
Jan 31, 2019, 4:49:11 PM1/31/19
to Puppet Users
Hello group,

Where can i find documentation for facter version 1.7.5 ?

Please address as the puppet official documents are not reachable.

Regards,
Abhishek Singh
Reply all
Reply to author
Forward
0 new messages