[Puppet-dev] Re: [augeas-devel] Re: Augeas and Puppet

Bryan Kearney bkearney at redhat.com
Wed Aug 13 14:22:45 UTC 2008



Raphaël Pinson wrote:
> 
> 
> On Wed, Aug 13, 2008 at 6:23 AM, David Lutterkort <dlutter at redhat.com 
> <mailto:dlutter at redhat.com>> wrote:
> 
>     On Tue, 2008-08-12 at 10:11 +0200, Raphaël Pinson wrote:
> 
> 
>      > I see an issue with this approach somehow. Puppet is
>     "state-centered",
>      > while Augeas is "change-centered". If you write a module that will
>      > apply changes using Augeas, it will apply these changes at every run
>      > of Puppet... Now Puppet resources usually have a state checker so
>     that
>      > the changes are only applied if a condition is met.
> 
>     At some point somebody has to turn a state description into actions -
>     the question is whether that should happen in Puppet or in Augeas.
> 
>      > I think it would be suitable for the augeas module to work this way,
>      > too :
>      >
>      >
>      > 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"
>      >       ],
>      >     onlyif => "get fedora.repo/fedora/enable != '1'"
>      >
>      > }
>      >
>      >
>      > onlyif could take conditions based on "get" or "match" requests.


Just to check. I assume get would support = != > < assuming strings. 
What would you expect for match? Would it be array cmparisons such as 
includes, isEmpty, length?

-- bk






More information about the augeas-devel mailing list