update nginx_version fact to check for kernel not equal windows

This commit is contained in:
Greg Koch 2016-06-08 14:33:02 -04:00 committed by Greg Koch
parent 36952873b9
commit b6c6df1f61

View file

@ -1,6 +1,6 @@
Facter.add(:nginx_version) do Facter.add(:nginx_version) do
setcode do setcode do
if Facter::Util::Resolution.which('nginx') if Facter.value('kernel') != 'windows' && Facter::Util::Resolution.which('nginx')
nginx_version = Facter::Util::Resolution.exec('nginx -v 2>&1') nginx_version = Facter::Util::Resolution.exec('nginx -v 2>&1')
%r{^nginx version: nginx\/([\w\.]+)}.match(nginx_version)[1] %r{^nginx version: nginx\/([\w\.]+)}.match(nginx_version)[1]
end end