Hey guys,
Is there any other way to automate this setting in my.cnf:
server-id=1
So that if the host is db1 it'll get a value of 1, for db2 a value of 2, for db3 a value of 3 and db4 a value of 4?
The only way I can think of this is to have branching logic in the puppet manifest that does a test on the $hostname fact. But then you'd have to have 4 files corresponding to each host.
But I'd like to find a way to get this to happen automatically using templates.
I'm already setting up the SSL certs for the DB servers using the fqdn fact like this:
ssl-cert=/opt/mysql/<%= fqdn %>.crt
ssl-key=/opt/mysql/<%= fqdn %>.key
I'm looking for a way to just have one my.cnf template for all 4 db hosts that automatically assigns the right value to server-id the way I describe above.
Any suggestions that could allow for that would be very welcome!
Thanks,
Tim
--