3ce8ad3799
- Add spec test for mysql_version fact - Add `mysql_version` fact to README
8 lines
186 B
Ruby
8 lines
186 B
Ruby
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
|