Hi David, I was just looking a bit more into augeas: Is there a way to set variables in augeas wit values obtained by a 'get' statement?
Like: ... augtool> get /files/etc/sysconfig/kernel/MODULES_LOADED_ON_BOOT /files/etc/sysconfig/kernel/MODULES_LOADED_ON_BOOT = "ipv6" ... Thus having a variable $oldval with values 'ipv6' which I could reuse to set the value again. In this way an appending of values would be easy, e.g.: ... augtool> set /files/etc/sysconfig/kernel/MODULES_LOADED_ON_BOOT "$oldval sunrpc" Thanks and bye, Frederik On Tue, Feb 23, 2010 at 1:42 PM, Frederik Wagner <fner...@googlemail.com> wrote: > Hi David, > > On Tue, Feb 23, 2010 at 1:09 AM, David Lutterkort <lut...@redhat.com> wrote: >> On Mon, 2010-02-22 at 10:45 +0100, Frederik Wagner wrote: >>> MODULES_LOADED_ON_BOOT="module1 module2" >>> >>> My goal ist to have a type, which can append a "module3" to this >>> entry, or replace the whole list, etc. (to stay generic for different >>> files in /etc/sysconfig). >> >> If you can live with replacing the entire list, you can just use augeas: >> >> augeas { "my_boot_modules": >> changes => "set >> /files/etc/sysconfig/kernel/MODULES_LOADED_ON_BOOT '$mymodules'" >> } >> >> If you need to build the list up from something else, you might want to >> wrap the above into a define that computes $mymodules from that >> something. > > I would need to append single modules to the list, therefore I was > thinking to write the provider. > >> >> There's also ways to make this just append a specific module, but that >> would require some work on the Augeas side. > > does this need new features on the augeas side? Or is it already > doable with the current augeas? > > Anyway a bit more documentation on the ParseFile provider would be nice. > > Thanks a lot, > Fredeirk > >> David >> >> >> -- >> 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. >> >> > -- 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.