Hi David, Thanks for your reply, it cleared up some things!
On 22 feb, 20:35, David Lutterkort <lut...@redhat.com> wrote: > You want to restrict when to make those changes with the onlyif > paramater, something like > > augeas { "...": > context => ... > changes => ... > onlyif => "match *[ Pin = 'release' and Package = 'augeas-lenses'] > size == 0" > } Ah, so I was wrong in thinking that augeas would treat these kind of config blocks as one entity with different variables. That makes the augeas type a little less useful than I thought, but I probably should've figured that out when I was building the lenses I needed. There's simply no $name equivalent in augeas. Thanks for making that clear. > You'd need to add another augeas resource to cover that case, something > like > > augeas { "...": > context => "/files/etc/apt/preferences[Pin = 'release' and Package > = 'augeas-lenses']", > changes => "set Pin-Priority 900", > onlyif => "match * size == 0" > } Ok, so I'd be better off creating a type that adds these different kinds of augeas resources with different checks for each variable part of the resource. > > If there's no augeas- > > lenses definition available, it *segfaults*: > > > /usr/lib/ruby/1.8/augeas.rb:48: [BUG] Segmentation fault > > ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux] > > > Aborted > > When that happens, is libaugeas0 installed ? Yes, very sure it is, because my augeas resource depends on Package["libaugeas-ruby1.8"], which depends on libaugeas0. Thanks for the tips! I'll see what I can make of it. Even though it requires more code, I still think augeas is a cleaner solution than concatenated files (although I love your concatenated_file module, DavidS!). -- Kind regards, Tim -- 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.