http://docs.puppetlabs.com/references/latest/type.html#augeas
http://forge.puppetlabs.com/puppetlabs/stdlib (file_line with match parameter) “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Andreas Hilboll" <li...@hilboll.de> To: "Puppet Users" <puppet-users@googlegroups.com> Sent: Friday, January 4, 2013 12:46:34 PM Subject: [Puppet Users] How to manage one line in a file by puppet 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.