I found the way, need 3 declarations and one server-side script: 1) Use generate() to call mysqldump on the puppetmaster, also MySQL replication master 2) Transfer the dump file to the slave (via rsync, scp, or even puppet file transport, etc.) with an exec {...} 3) Import the db into the slave MySQL with an exec {...}
Now I need to fine-tune this further for error handling, recovery and repeatability. Upgrade to the latest 0.25 with EPEL RPM is definitely worth it: http://tmz.fedorapeople.org/repo/puppet/epel/5 Son Nguyen On Jan 22, 5:05 pm, mathie <trung...@gmail.com> wrote: > Hello, > > I'm new to puppet (3 days and learning). I've been able to setup the > packages, service, users, so on. Is there any existing recipe to setup > replication automatically using puppet? The puppetmaster is also the > MySQL master and the replication slave is the new machine being setup > via puppet. > > Thanks -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.