Hello,

Trying to create a custom fact that will be created if there is existing 
Linux service.
I am using check for the file existence and it works. See below.
But it looks like a better way would be using Puppet resource "service".
If someone has idea on more elegant implementation, please, advise.

Facter.add(:service_test) do
        confine :osfamily => "RedHat"
        setcode do
                if File.exist? '/etc/init.d/service_test'
                'service_test'
                end
        end
end

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7e48ed36-2be2-4ba1-bfe3-b0a0f75199c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to