Hello Patrick, hello Martijn, thank you both for your sugestions:
Am Friday 10 December 2010 21:37:29 schrieb Patrick:
> On Dec 9, 2010, at 7:14 AM, Martijn Grendelman wrote:
> > On 09-12-10 15:30, Martijn Grendelman wrote:
> >> An example: add the following to
> >>
> >> <puppet_path>/modules/<modulename>/lib/facter/augeas_available.rb
> >>
> >> -- cut here --
> >> require 'facter'
> >>
> >> Facter.add("augeas_available") do
> >>
> >> setcode do
> >>
> >> avail = "no"
> >> Dir.glob("/usr/lib/libaugeas*") { |filename|
> >> avail = "yes"
> >> }
> >> avail
> >> end
> >> end
> >> -- cut here --
> I think this one might be better:
> https://github.com/camptocamp/puppet-augeas/blob/master/lib/facter/augeasve
>rsion.rb
>
> I think it will check if Augeas and the ruby bindings exist.
Both works well. If you modify the glob in Martijns script to:
/usr/lib*/libaugeas*
it works with Debian and CentOS5 (and RedHat5 of course). The other script
works out of the box on both OS. Only One thing made some trouble for me: You
have to set executable bits to the fact scripts. May be, this should be
documentented in the wiki.
Best regards,
Hubert
--
Hubert Krause
Risk & Fraud Division
INFORM GmbH, Pascalstraße 23, 52076 Aachen, Germany
Phone: +49 24 08 - 94 56 5145
E-Mail: [email protected], Web: http://www.inform-ac.com
INFORM Institut fuer Operations Research und Management GmbH
Registered AmtsG Aachen HRB1144 Gfhr. Adrian Weiler
signature.asc
Description: This is a digitally signed message part.
