2014-11-06 03:14:35 +01:00
|
|
|
def get_mysql_id
|
2015-10-12 18:36:39 +02:00
|
|
|
Facter.value(:macaddress).split(':').inject(0) { |total,value| (total << 6) + value.hex }
|
2014-11-06 03:14:35 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
Facter.add("mysql_server_id") do
|
|
|
|
setcode do
|
2015-06-25 19:23:58 +02:00
|
|
|
get_mysql_id rescue nil
|
2014-11-06 03:14:35 +01:00
|
|
|
end
|
|
|
|
end
|