module-puppetlabs-mysql/lib/facter/mysql_version.rb

9 lines
186 B
Ruby
Raw Permalink Normal View History

Facter.add("mysql_version") do
setcode do
mysql_ver = Facter::Util::Resolution.exec('mysql --version')
if mysql_ver
mysql_ver.match(/\d+\.\d+\.\d+/)[0]
end
end
end