[Puppet Users] Re: Using Augeas to manage /etc/network/interfaces from Puppet

2010-10-06 Thread Andrew Pollock
On Oct 6, 12:22 pm, Rob McBroom wrote: > On Oct 6, 2010, at 2:31 PM, Andrew Pollock wrote: > > > I hear there's some user-contributed Augeas examples in a Puppet wiki > > somewhere, but I haven't been able to find them. Any pointers appreciated. > > There is (and even I have a hard time finding i

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread Avi Miller
Hey guys, David Lutterkort wrote: > If you have Augeas 0.4.1 on both the puppet client and master (count was > only added in 0.4.1) this should work. Bryan, any ideas what could be > wrong ? Just a follow-up and warning: if you try this on an older version of augeas (0.3.5 in my case), it tends

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread David Lutterkort
On Wed, 2009-03-04 at 21:38 +1300, AJ Christensen wrote: > What work is involved in getting a functional Augeas resource? I'm not > sure we want to expose the level of functionality of Augeas entirely, > but perhaps expose it through limited resources, that is unless we can > lock it down a

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread Bryan Kearney
Avi Miller wrote: > > > David Lutterkort wrote: >> Ouch .. you are right. There's a bug that makes '>' mean'>=' and '>=' >> mean '>'. I'll commit a fix. > > Well, on the plus side, it means I'm not actually going insane. :) > > Quick question: I'm trying to have multiple onlyif matches using

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread Bryan Kearney
Avi Miller wrote: > > > David Lutterkort wrote: >> Ouch .. you are right. There's a bug that makes '>' mean'>=' and '>=' >> mean '>'. I'll commit a fix. > > Well, on the plus side, it means I'm not actually going insane. :) > > Quick question: I'm trying to have multiple onlyif matches using

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread Bryan Kearney
David Lutterkort wrote: > On Wed, 2009-03-04 at 10:48 +1100, Avi Miller wrote: >> Hi David, >> >> David Lutterkort wrote: >>> You definitely should read up on path expressions[1] for that, and maybe >>> even have a look at the test cases for them[2], since they show some >>> more esoteric uses. >>

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread James Turnbull
On Mar 4, 11:24 pm, AJ Christensen wrote: > To clarify; if you're upset by my behavior - this was meant to be an   > off-list reply. I apologies if I've offended anyones sensibilities. > > Puppet tends to gather some of the smartest minds around architecture. > > Regards, > Hi all At AJ's reque

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread AJ Christensen
To clarify; if you're upset by my behavior - this was meant to be an off-list reply. I apologies if I've offended anyones sensibilities. Puppet tends to gather some of the smartest minds around architecture. Regards, AJ On 5/03/2009, at 12:18 AM, paul matthews wrote: > I could be out of line

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread AJ Christensen
No. Regards, AJ On 5/03/2009, at 12:18 AM, paul matthews wrote: > I could be out of line in saying this but rather than developing an > alternate to Puppet, would your efforts not be better served > producing something that is complementary. The puppet equivalent of > http://nagiosexchange

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread paul matthews
I could be out of line in saying this but rather than developing an alternate to Puppet, would your efforts not be better served producing something that is complementary. The puppet equivalent of http://nagiosexchange.org, springs to mind. As I understand it there is a need for a repository for mo

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-04 Thread AJ Christensen
Hi David, Not sure if you looked at it, but I'm one of the developers of Chef; an alternate ruby-based configuration management / systems integration framework. What work is involved in getting a functional Augeas resource? I'm not sure we want to expose the level of functionality of Augea

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
David Lutterkort wrote: > Augeas will not actually change the file if it stays byte-for-byte > identical, even if you made changes to the tree (e.g. change the value > of a node to something new, then back to the old thing) Well, that's handy. :) Thanks! Avi --~--~-~--~~---

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 12:46 +1100, Avi Miller wrote: > Hi David, > > David Lutterkort wrote: > > Yeah, that's what that means. Here's a dirty trick to check multiple > > conditions: > > Your assistance so far has been awesome. If I had more time to play, I'm > sure I could solve this in time, b

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hi David, David Lutterkort wrote: > Yeah, that's what that means. Here's a dirty trick to check multiple > conditions: Your assistance so far has been awesome. If I had more time to play, I'm sure I could solve this in time, but I'm being hammered by the security teams and I need to get a solu

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 11:07 +1100, Avi Miller wrote: > I assume this means that the Augeas type doesn't support an array in > onlyif, but I thought I'd check to be 100% sure. :) Yeah, that's what that means. Here's a dirty trick to check multiple conditions: onlyif => "match /files[ (c

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
David Lutterkort wrote: > Ouch .. you are right. There's a bug that makes '>' mean'>=' and '>=' > mean '>'. I'll commit a fix. Well, on the plus side, it means I'm not actually going insane. :) Quick question: I'm trying to have multiple onlyif matches using standard Puppet syntax, i.e. only

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 11:01 +1100, Avi Miller wrote: > However, note that the > appears to imply >=, i.e. if I use > count(argument)>5 then it will fire when there are 5 arguments. If I use > >6, it will not fire on 5 arguments, but will fire on 6. Ouch .. you are right. There's a bug that mak

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hi, David Lutterkort wrote: > If you have Augeas 0.4.1 on both the puppet client and master (count was > only added in 0.4.1) this should work. Bryan, any ideas what could be > wrong ? I have upgraded both my test client and master to 0.4.1 and I have worked out the problem. Switching to this o

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 10:48 +1100, Avi Miller wrote: > Hi David, > > David Lutterkort wrote: > > You definitely should read up on path expressions[1] for that, and maybe > > even have a look at the test cases for them[2], since they show some > > more esoteric uses. > > I'm still having a bit of

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hi David, David Lutterkort wrote: > You definitely should read up on path expressions[1] for that, and maybe > even have a look at the test cases for them[2], since they show some > more esoteric uses. I'm still having a bit of a brain disconnect on converting Augeas' XPath stuff into Puppet ty

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 09:43 +1100, Avi Miller wrote: > Hey list, > > Bryan Kearney wrote: > > onlyif => "match AllowGroups/*[.='sshuser'] size == 0", > > Just to let you all know that this works perfectly with Augeas 0.4.1-1 > from EPEL-testing. > > Now to move onto using Augeas w

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hey list, Bryan Kearney wrote: > onlyif => "match AllowGroups/*[.='sshuser'] size == 0", Just to let you all know that this works perfectly with Augeas 0.4.1-1 from EPEL-testing. Now to move onto using Augeas with the pam.d files. :) I have to work out how to remove lines that ar

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hey David, David Lutterkort wrote: > EPEL only pushes from epel-testing to epel infrequently (usually when a > coresponding RHEL update release happens) That means that if you want > updates in between, you need to enable the epel-testing repo. Awesome, thanks! cYa, Avi --~--~-~--~

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Wed, 2009-03-04 at 06:35 +1100, Avi Miller wrote: > Any idea when 0.4.0 will show up on EPEL in an official format? :) EPEL only pushes from epel-testing to epel infrequently (usually when a coresponding RHEL update release happens) That means that if you want updates in between, you need to e

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Avi Miller
Hi David, David Lutterkort wrote: > If you are using Augeas 0.4.0 or newer, you can use the following: Unfortunately, I'm using Augeus 0.3.6, which is the latest version in EPEL. I will download the 0.4.0 sources and rebuild the RPM and give it a whirl. Any idea when 0.4.0 will show up on EPE

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread David Lutterkort
On Tue, 2009-03-03 at 10:05 +1100, Avi Miller wrote: > Hey Bryan, > > Bryan Kearney wrote: > >augeas { "sshd_conf_group_sshuser": > >context => "/files/etc/ssh/sshd_config", > >changes => "set AllowGroups/1 sshuser", > >onlyif => "match AllowGroups != sshuser >

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Bryan Kearney
Bryan Kearney wrote: > Avi Miller wrote: >> Hey Bryan, >> >> Bryan Kearney wrote: >>>augeas { "sshd_conf_group_sshuser": >>>context => "/files/etc/ssh/sshd_config", >>>changes => "set AllowGroups/1 sshuser", >>>onlyif => "match AllowGroups != sshuser >>>} >>

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-03 Thread Bryan Kearney
Avi Miller wrote: > Hey Bryan, > > Bryan Kearney wrote: >>augeas { "sshd_conf_group_sshuser": >>context => "/files/etc/ssh/sshd_config", >>changes => "set AllowGroups/1 sshuser", >>onlyif => "match AllowGroups != sshuser >>} > The current type does not supp

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-02 Thread Avi Miller
Hey Bryan, Bryan Kearney wrote: >augeas { "sshd_conf_group_sshuser": >context => "/files/etc/ssh/sshd_config", >changes => "set AllowGroups/1 sshuser", >onlyif => "match AllowGroups != sshuser >} This doesn't seem to work either. If I try it without the "on

[Puppet Users] Re: Using Augeas type to update sshd_config's AllowGroups

2009-03-02 Thread Bryan Kearney
Avi Miller wrote: > Hey gang, > > I seem to be having a brain disconnect on how to get the Augeas type to > manage things that have multiple values (i.e. an Augeas tree) via Puppet. > > If I run this in augtool: > > augtool> set /files/etc/ssh/sshd_config/AllowGroups/1000 sshuser > augtool> sa

[Puppet Users] Re: Using Augeas

2008-12-17 Thread Thomas Bellman
David Lutterkort wrote: > On Tue, 2008-12-16 at 09:52 +0100, Thomas Bellman wrote: >> 1. Is it possible to specify what lens to use for editing a >> certain file? Can I for instance tell it to use the sshd lens >> to edit an sshd config file in a non-standard place? > > Add the directo

[Puppet Users] Re: Using Augeas

2008-12-16 Thread David Lutterkort
On Tue, 2008-12-16 at 09:52 +0100, Thomas Bellman wrote: > 1. Is it possible to specify what lens to use for editing a > certain file? Can I for instance tell it to use the sshd lens > to edit an sshd config file in a non-standard place? Add the directory with your custom lens to the loa

[Puppet Users] Re: Using Augeas

2008-12-16 Thread Bryan Kearney
Thomas Bellman wrote: > I'm reading about Augeas to see what can be done with it, and > with the new 'augeas' resource type in 0.24.7. So far I have > only played using augtool, not the Puppet integration, but I > have a few questions: The type is basically a wrapper around augtool. So.. the ans