On Friday 02 October 2009 11:06:39 Aurelien Degremont wrote: > Thomas Bellman a écrit : > > Aurelien Degremont wrote: > >> How do you deal with a file, like /etc/sysconfig/network which have > >> content composed from different aspects (could be network, nfs, nis, > >> ...). So managed by various modules but all > of them should add its > >> own stuff to the same file. > >> > >> What is your elegant way to deal with this? > > > > Edit the individual settings using e.g. Augeas. Preferably wrap it in > > a define, so you don't have to deal with the augeas type directly every > > time you want to change something in /etc/sysconfig. > > I put /etc/sysconfig/network as an example. AFAIK, unfortunately, Augeas > only handles known files (existing lenses). If we trty to handle > /etc/our_local_config_file, it is not so easy.
I usually handle that by distributing custom augeas lenses with puppet and putting them in /usr/share/augeas/lenses/. This isn't actually very hard as most of those lenses are slightly customized versions of lenses bundled with augeas (very often only with adjusted filter to include the file I need to change). That is unless you have a not-yet-supported config file type or a really hard to handle one. Suppose augeas could be a bit more flexible with regards to the file filters, or at least allowing to modify it on runtime :) -- Michael Gliwinski Henderson Group Information Services 9-11 Hightown Avenue, Newtownabby, BT36 4RT Phone: 028 9034 3319 ********************************************************************************************** The information in this email is confidential and may be legally privileged. It is intended solely for the addressee and access to the email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed in the governing client engagement leter or contract. If you have received this email in error please notify supp...@henderson-group.com John Henderson (Holdings) Ltd Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT. Registered in Northern Ireland Registration Number NI010588 Vat No.: 814 6399 12 ********************************************************************************* --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---