Not ab augeas expert but IIRC what I did in a similar situation is force
puppet/augeas to point to only one file.

Try adding "context," "incl," and "lens" to your augeas definition, like
the example below.  By specifying the lens, I think it helps speed up the
augeas type also.  At least I read that somewhere.  :)

  augeas { 'selinux_config':
    context => '/files/etc/selinux/config',
    incl    => '/etc/selinux/config',
    lens    => 'Shellvars.lns',
    changes => "set SELINUX ${selinux_state}",
  }

If I need to customize a lens, I stick it in /usr/share/augeas/lenses and
manage it with puppet.  I leave the lenses in /dist/ alone.
Kent


On Mon, Apr 28, 2014 at 2:56 PM, Pete Hartman <pete.hart...@gmail.com>wrote:

> I hope this is an appropriate place for this question; if not, any
> redirection to a more appropriate place is appreciated.
>
> So: I'm trying to set up puppet + augeas on an opensolaris system.  There
> are certain files I have that are under RCS version control--this is not
> all my doing, so some of these things I cannot change.  This creates files
> under /etc/ that are like "filename,v".
>
> I'm using puppet 2.7.22 and augeas 1.0.0.
>
> Well, augtool, and apparently augeas invoked via puppet throw up on this.
>  Augtool reports
>
> Failed to initialize Augeas
> error: Invalid path expression
> error: garbage at end of path expression
> /augeas/files/etc/default/nfs|=|,v
>
> I just want augeas to ignore these files...
>
> I think the answer is to modify the
> /usr/local/share/augeas/lenses/dist/*.aug files that refer to things that
> are causing this grief and add excl clauses to explicitly exclude anything
> *,v.
>
> For example in shellvars.aug we have
>
> let filter_default = incl "/etc/default/*"
>     . excl "/etc/default/grub_installdevice*"
>     . excl "/etc/default/whoopsie"
>
> I've added
>     . excl "/etc/default/*,v"
>
> This appears to work.  But I'm not sure this is the "right" solution --
> should I perhaps be making a copy of this to somewhere else and override
> the dist version?  Is there a more global way I could say "ignore all files
> that have ,v after them" ?
>
> Thanks
>
> Pete
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/017535fd-ff18-48e5-83eb-50d5f35b1a9e%40googlegroups.com<https://groups.google.com/d/msgid/puppet-users/017535fd-ff18-48e5-83eb-50d5f35b1a9e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Kent Brede

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2BnSE38O8YSwLa9fbA1NCihs6DaHqkZedShiHPd_%2B%2BgdZ1z%2BKw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to