Kelly Collier wrote: > Hi. > > I'd like to modify certain values in the config files on client machines. > > For example: > > in /boot/grub/menu.lst, change "timeout 10" to "timeout 3" > > I'd prefer not to create a template, since there's no guarantee that the > rest of menu.lst is the same (e.g., a kernel is updated on one client > machine but not another). > > The sloppy solution I'm using now is exec'ing a sed command if > /timeout\s+3/ is not found in the file. But it just seems tacky. > > Any suggestions on how to do this more properly? augeas {"/boot/grub/grub.conf": context => "/files/boot/grub/grub.conf", changes => [ "set timeout 3", ], require => File["/usr/share/augeas/lenses/grub.aug"] }
Because of a bug in the current Augeas I have a copy of /usr/share/augeas/lenses/dist/grub.aug in /usr/share/augeas/lenses/grub.aug where I've edited the hard coded location of /etc/grub.conf to /boot/grub/grub/conf, hence the require on the above. If your /etc is on the same disk partition as your /boot then you won't need this. -- Trevor Hemsley Infrastructure Engineer ................................................. * C A L Y P S O * 4th Floor, Tower Point, 44 North Road, Brighton, BN1 1YR, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. * P * /*/ Please consider the environment before printing this e-mail /*/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@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 -~----------~----~----~----~------~----~------~--~---