Skip to content

Instantly share code, notes, and snippets.

@mrpatrick
Created February 13, 2012 19:17
Show Gist options
  • Select an option

  • Save mrpatrick/1819239 to your computer and use it in GitHub Desktop.

Select an option

Save mrpatrick/1819239 to your computer and use it in GitHub Desktop.
facter plugin to show apache version
#
# httpd.rb - facter to show apache version
#
output=`/usr/sbin/httpd -v | sed 's/[://]/ /g' |awk '/version/ {print $4}'`
if output
Facter.add("apache") do
setcode do
output
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment