On Thursday, September 19, 2013 4:23:15 PM UTC-5, Frederiko Costa wrote:
>
> Hi,
>
> I've got a facter shipped with a custom module. This factor returns the
> version of a determined package. It returns nil if the package is not
> installed yet.
>
> When running for the first time, assuming the
Post the code for the custom fact?
On Thursday, September 19, 2013 2:23:15 PM UTC-7, Frederiko Costa wrote:
>
> Hi,
>
> I've got a facter shipped with a custom module. This factor returns the
> version of a determined package. It returns nil if the package is not
> installed yet.
>
> When runnin
Sure ...
Here it is:
#
# terracota_version.rb
#
# Reports terracota version if terracotta is installed
Facter.add(:terracotta_version) do
cmd = %x{/bin/rpm -qa terracotta --queryformat %{VERSION}}
setcode do
if ! cmd.nil?
cmd
else
nil
end
end
end
-frederiko
On Fri, Sep 20, 2013 at 10: