I'm doing this with the augeas piece like so:

augeas { 'make_grub_verbose':
      context => '/files/etc/grub.conf',
      changes => [
                    'rm hiddenmenu',
                    'rm splashimage',
                 ],
   }

You should be able to use those features as you like.


--Jerald


On Jan 4, 2013, at 12:46 PM, Andreas Hilboll <li...@hilboll.de> wrote:

> Hi,
> 
> I want to write a puppet module for xen on Debian. This module will need
> to manage one line in the file /etc/default/grub, namely the line
> starting with "GRUB_CMDLINE_XEN=". Currently I want to leave the rest of
> the file untouched.
> 
> Which would be the best way to do this?
> 
> I see two options:
> 
> a) Do some `sed` magic on the file in a `exec` call. Downside: puppet
> won't notice when the line gets manually changed.
> 
> b) Have some support for sections inside files, like this:
> 
> [... part of file untouched by puppet ...]
> ###
> # BEGIN MANAGED BY PUPPET: IDENTIFIEROFPUPPETRESOURCE
> ###
> GRUB_CMDLINE_XEN='my options'
> ###
> # END MANAGED BY PUPPET: IDENTIFIEROFPUPPETRESOURCE
> ###
> [... rest of file untouched by puppet ...]
> 
> Is there support for something like this?
> 
> Cheers, Andreas.
> 
> -- 
> 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.
> 

-- 
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.

Reply via email to