module-mysql/lib/facter/mysql_version.rb
2013-01-02 18:18:39 +01:00

6 lines
186 B
Ruby

Facter.add("mysql_version") do
confine :mysql_exists => true
setcode do
Facter::Util::Resolution.exec('mysql --version').chomp.split(' ')[4].split(',').first
end
end