Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Forked from DamianZaremba/mysql.rb
Created July 26, 2012 13:08
Show Gist options
  • Save sarahhodne/3181948 to your computer and use it in GitHub Desktop.
Save sarahhodne/3181948 to your computer and use it in GitHub Desktop.
Facter MySQL version module
Facter.add(:mysql_version) do
setcode do
mysql_version = Facter::Util::Resolution.exec('mysql --version')
mysql_version.chomp.split(' ')[4].gsub(',', '') if mysql_version
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment