optimization - Templating MySQL's my.cnf for setup in Puppet -


i have been tasked templating mysql's my.cnf in attempt standardize configuration amongst slave databases using puppet. right now, i'm targeting innodb settings. there configuration options can safely calculated against hardware specifications such memory, disk , procs?

you need facter.

puppet:/etc/puppet/modules/master/lib/facter$ cat disks.rb #!/usr/bin/ruby #require 'facter'  mount = `/bin/mount` disks=array.new  mount.split("\n").each_with_index { | disk,i |   unless disk.scan(/ext3|simfs|reiserfs|xfs/).empty?     d=disk.split[2]     disks.push d     disks.push ','  end }  facter.add('disks')  setcode    disks  end  end  

` , in puppet.pp use facts $disks

#add disk check zabbix exec { "create_host":     command => "/bin/echo $fqdn $ipaddress $disks | do_work",     require => file["/root/ticket"],     subscribe => file["/root/ticket"],     refreshonly => true, } 

see "adding custom facts facter" on puppet labs.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -