[augeas-devel] Re: Augeas and Puppet
David Lutterkort
dlutter at redhat.com
Mon Aug 4 18:23:21 UTC 2008
On Mon, 2008-08-04 at 16:39 +0200, Kjetil Torgrim Homme wrote:
> David Lutterkort <dlutter at redhat.com> writes:
> > As Bryan said, that's pretty close to how his Augeas type currently
> > works. You'd write
> >
> > augeas { "some-random-name":
> > context => "/files/etc/yum.repos.d",
> > changes => [
> > "set fedora.repo/fedora/enabled 1",
> > "set fedora.repo/fedora/gpgcheck 1",
> > "set fedora-updates.repo/fedora-updates/enabled 1",
> > "set fedora-updates.repo/fedora-updates/gpgcheck 1"
> > ]
> > }
> >
> > 'context' is just a convenience so you don't have to type the same
> > path prefix over and over, and all the relative paths in 'changes'
> > are relative to that.
>
> this solves the atomicity problem very nicely, but it will be
> difficult for Augeas to find the filenames and lens(es) without
> evaluating all lenses.
Once the API supports it, there's no difficulty in expanding the type to
support 'lens' and 'filename' parameters, like
augeas { "some-random-name":
context => "...",
changes => [ ... ],
files => "/files/etc/yum.repos.d/*.repo"
lens => "Yum.lns"
}
Alternatively, setting up lens/filename mappings through a separate type
(augeas::transform) might also be a possibility.
> > For now, there's no way to specify a specific lens - the assumption
> > is that the lenses installed on the system agree with what you're
> > doing in your puppet manifest.
>
> a reasonable assumption, I'm just worried about performance.
That's best addressed on actual performance measurements and data; there
are still many ways in which Augeas' performance can be improved.
> just agreeing
> on a cross-platform tree for network configuration is a very tall
> order, and I'm not even sure if it is right that Augeas enters this
> territory -- this should be handled by Puppet IMHO.
Yes, I briefly tried to address some of that, but it opens a very
unsavory can of worms, and I decided to leave that out.
David
More information about the augeas-devel
mailing list