On Apr 28, 2010, at 5:02 PM, Jesús M. Navarro wrote: > Hi, Patrick: > > On Wednesday 28 April 2010 23:42:38 Patrick wrote: >> On Apr 28, 2010, at 1:10 PM, Jesús M. Navarro wrote: >>> Hi, list: >>> >>> I'm trying to add a Debian-based Xen Dom0 server to puppet management. > > [...] > >> I won't call this way elegant, but there is an easy way to do it. >> >> >> file { >> "/boot/grub/server_menu.lst": >> mode => "0644", >> owner => root, >> group => root, >> notify => Exec["updated_menu.lst"], >> source => "puppet:///s_virtualcluster/menu.lst"; >> } >> >> exec { "cp -p /boot/grub/server_menu.lst /boot/grub/menu.lst": >> path => "/usr/bin:/usr/sbin:/bin", >> alias => "updated_menu.lst", >> refreshonly => true, >> notify => Exec["update-grub"], >> } >> >> exec { "update-grub": >> path => "/usr/bin:/usr/sbin:/bin", >> refreshonly => true, >> } > > First of all, thanks for your help. I think your idea covers the first part > of the equation but unless I misunderstood, it won't cope with the second > part. > > From what I see, yours will cope with the case where I update menu.lst > server-side, but what if somebody changes the client's copy > of /boot/grub/menu.lst? It seems puppet won't notice it so won't recover > the "proper" contents (as per the puppetmaster idea of it). Am I right? > > Cheers and thank you for your interest.
You're right. It won't do that. Try removing refreshonly on the second command, and replacing it with an "unless" or "onlyif" that uses /usr/bin/diff. -Patrick -- 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.