[Puppet Users] Re: Augeas and grub.conf

2009-08-03 Thread Bryan Kearney
Trevor Hemsley wrote: > Having just spent about 2 hours trying to work out how to add a > > password --md5 $1$Qejy8/$.qFUuDeYL.cuSDpN1ZD.S1 > > line to my grub.conf I thought it would be worth sharing how I finally > got it to work. > > augeas {"/boot/grub/grub.conf": >

[Puppet Users] Re: Augeas and grub.conf

2009-08-03 Thread Bryan Kearney
Chad Huneycutt wrote: > +1 for that. I did the same thing last week. I ended up editing the > grub.conf lens. If there is a way to override the 'incl' directives > or point augeas at a specific file and tell it to use a specific lens, > I'd like to hear it as well. You can use the load_path pr

[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Bryan Kearney
Bjørn Dyresen wrote: > On Jun 25, 2009, at 10:42 PM, Neil K wrote: > >> Hi all, >> >> I am pretty new to Puppet. My puppet master server is a RHEL 5 box and >> puppet client is a CentOS 5.3 vm. I have managed to configure puppet >> server to successfully install.and upgrade rpm based packages on

[Puppet Users] Re: Installing applications using puppet

2009-06-25 Thread Bryan Kearney
Neil K wrote: > Hi all, > > I am pretty new to Puppet. My puppet master server is a RHEL 5 box and > puppet client is a CentOS 5.3 vm. I have managed to configure puppet > server to successfully install.and upgrade rpm based packages on the > client machine. Is it possible to install noon-rpm bas

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-10 Thread Bryan Kearney
lance dillon wrote: > O >> >> That doesn't quite work either: > > ### print /files/etc/modprobe.conf > ... > /files/etc/modprobe.conf/alias[5] = "usb-storage" > /files/etc/modprobe.conf/alias[5]/modulename = "off" > augtool> match /files/etc/modprobe.conf/alias[='usb-storage'] > (error matchin

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-09 Thread Bryan Kearney
lance dillon wrote: > On Tue, Jun 9, 2009 at 1:09 PM, Bryan Kearney wrote: > >> Bryan Kearney wrote: >>>> thanks >>> >>> ok.. I think this is it in augtool: >>> >>> match /files/etc/modprobe.conf/*[.="foo"] >>> >

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-09 Thread Bryan Kearney
Bryan Kearney wrote: >> thanks > > > ok.. I think this is it in augtool: > > match /files/etc/modprobe.conf/*[.="foo"] > > so.. in the plugin you can do > > 'match /files/etc/modprobe.conf/*[.="foo"] size = 0' > mo

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-09 Thread Bryan Kearney
lance dillon wrote: > On Tue, Jun 9, 2009 at 11:57 AM, Bryan Kearney wrote: > >> lance dillon wrote: >>> On Tue, Jun 9, 2009 at 11:16 AM, Bryan Kearney >> wrote: >>>> lance dillon wrote: >>>>> I need to be able to add: >>>&

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-09 Thread Bryan Kearney
lance dillon wrote: > On Tue, Jun 9, 2009 at 11:16 AM, Bryan Kearney wrote: > >> lance dillon wrote: >>> I need to be able to add: >>> >>> alias usb-storage off >>> >>> to /etc/modprobe.conf >>> >>> I have th

[Puppet Users] Re: puppet+augeas modprobe.conf

2009-06-09 Thread Bryan Kearney
lance dillon wrote: > I need to be able to add: > > alias usb-storage off > > to /etc/modprobe.conf > > I have this so far: > > augeas { "usb-storage": > context => "/files/etc/modprobe.conf", > changes => [ "set alias[last()+1] usb-storage", > "set alias[last()]/mod

[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated

2009-06-07 Thread Bryan Kearney
Gajillion wrote: > Solution! > > I owe everyone a big thanks and big apology. It turns out that rpm -e > ruby doesn't really rpm -e ruby... Pretty much everything in /usr/lib/ > ruby and /usr/lib64/ruby stayed in place when I did that, so when I > upgraded ruby and puppet from 0.24.5 to 0.24.8

[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated

2009-06-05 Thread Bryan Kearney
David Lutterkort wrote: > On Wed, 2009-06-03 at 12:56 -0700, Gajillion wrote: >> All, >> I've tried several lenses and several iterations and have never been >> able to get augeas and puppet to work together. My latest attempt: >> >> augeas {"memlock": >> changes => [ >> "

[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated

2009-06-04 Thread Bryan Kearney
Gajillion wrote: > So, a quick question then. I ran a very verbose strace on puppet > while it was going through this change. What I see is this. > You need to differentiate the plugin and augeas. Augeas writes a temp file and then copies it to the final location. Now.. the plugin. The first

[Puppet Users] Re: does puppet+augeas actually work? limits.conf busticated

2009-06-04 Thread Bryan Kearney
Gajillion wrote: > I have the complete augeas install as well as the ruby libs. That's > how I was able to test that the paths and inserts are valid Augeas > commands. The RPMs were pulled from EPEL 4. Just to be clear - it > works fine with just Augeas, but fails under Puppet driven Augeas. >

[Puppet Users] Re: dealing with numbered items in Augeas

2009-05-19 Thread Bryan Kearney
Brent Chapman wrote: > On Mon, May 18, 2009 at 10:53 AM, Trevor Vaughan wrote: > >> While this is kind of kludg-y, might you try building the multipart >> file with Puppet itself: >> >> http://reductivelabs.com/trac/puppet/wiki/Recipes/BuildingMultipartFiles >> >> It's useful for building files w

[Puppet Users] Re: puppet + augeas /etc/exports/dir[*] lookup possible?

2009-04-09 Thread Bryan Kearney
ndex 56e217a..618b672 100644 --- a/puppet/provider/augeas/augeas.rb +++ b/puppet/provider/augeas/augeas.rb @@ -18,6 +18,7 @@ # Author: Bryan Kearney require 'augeas' if Puppet.features.augeas? +require 'strscan' Puppet::Type.type(:augeas).provide(:augeas) do includ

[Puppet Users] Re: puppet + augeas /etc/exports/dir[*] lookup possible?

2009-04-08 Thread Bryan Kearney
Karl Bowden wrote: > Ok I've got it sorted now and I'll submit the recipe to the wiki after > somebody here reviews it as I'm only new to puppet. > > After writing tests in ruby with the libaugeas-ruby bindings it turns > out the problem is that the bindings do not like set values to be > quoted.

[Puppet Users] Re: Licensing and Copyright

2009-04-07 Thread Bryan Kearney
Jason Slagle wrote: > On Tue, 7 Apr 2009, Bryan Kearney wrote: > >> Kyle Cordes wrote: >>> There is dangerous territory nearby: Paying customers have a higher >>> expectation of a smooth out-of-box-experience, than open source users; >>> to make this hap

[Puppet Users] Re: Licensing and Copyright

2009-04-07 Thread Bryan Kearney
Kyle Cordes wrote: > Luke Kanies wrote: >> As is probably obvious, I've scaled back my free online support and my >> attempts at fixing every bug ever, but a certain amount is still > > There is dangerous territory nearby: Paying customers have a higher > expectation of a smooth out-of-box-e

[Puppet Users] Re: Licensing and Copyright

2009-04-07 Thread Bryan Kearney
Luke Kanies wrote: > On Apr 6, 2009, at 4:37 PM, David Lutterkort wrote: > >>> What do you think? >> I am also much in favor of #2. I can see that relicensing as LGPL >> might >> make some sense. > > That seems to be the majority view so far, but there are still plenty > of concerns about th

[Puppet Users] Re: puppet + augeas /etc/exports/dir[*] lookup possible?

2009-04-07 Thread Bryan Kearney
Just checking if these came out of order. Is this working or not for you? -- bk Karl Bowden wrote: > On Tue, Apr 7, 2009 at 11:46 AM, Karl Bowden wrote: >> On Mon, Apr 6, 2009 at 11:59 PM, Bryan Kearney wrote: >>> agentk wrote: >>>> I'm not sure if I'

[Puppet Users] Re: puppet + augeas /etc/exports/dir[*] lookup possible?

2009-04-06 Thread Bryan Kearney
agentk wrote: > I'm not sure if I'm kicking tyres again, but first off: I like the > possibilities with puppet + augeas. > > Trying to make a working example with /etc/exports but not sure of how > to proceed. I want to be able to define exports in the following form: > > my_exports_def { > ['

[Puppet Users] Re: Augeas not saving changes

2009-03-30 Thread Bryan Kearney
Avi Miller wrote: > Hey gang, > > I'm using the latest Puppet/Augeas RPMs from EPEL testing: > > puppet-0.24.8-1.el5.1 > augeas-0.4.2-1.el5 > augeas-libs-0.4.2-1.el5 > > I have the following in my Puppet manifest: > > augeas { "rpm": > context => "/etc/logrotate.d/rpm", > changes => [

[Puppet Users] Re: Augeas type proposal; long.

2009-03-05 Thread Bryan Kearney
Robin Lee Powell wrote: > > Just to be clear: I am offering to write what I describe below if it > seems acceptable to others (and if I get the time). > > I love the idea of Augeas, and I love that Puppet has built-in > support for it. However, I'm finding that I'm routinely unable to > do thin

[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-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

[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 =&

[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

Re: [augeas-devel] Re: [Puppet Users] Testing help for new Augeas Puppet provider which only executes if required

2009-02-23 Thread Bryan Kearney
David Lutterkort wrote: > On Fri, 2009-02-20 at 07:53 -0500, Bryan Kearney wrote: >> One question If I have a file with 10 nodes, does augeas re-write >> the whole file, or just scan for the nodes which changed? > > It will write a new file (into a tmp location) and

Re: [augeas-devel] Re: [Puppet Users] Testing help for new Augeas Puppet provider which only executes if required

2009-02-20 Thread Bryan Kearney
Ben wrote: > David Lutterkort wrote: >> On Thu, 2009-02-19 at 16:26 -0500, Bryan Kearney wrote: >> >>> so.. the next question this is if we attempt the model of not executing >>> unless changes are made at the initial scan, it is possible that some >>&

Re: [augeas-devel] Re: [Puppet Users] Testing help for new Augeas Puppet provider which only executes if required

2009-02-19 Thread Bryan Kearney
David Lutterkort wrote: > On Wed, 2009-02-18 at 13:07 -0500, Bryan Kearney wrote: >> The issue is, will any changes made to the file by other types between >> steps 3.3 and 5.1 be lost, and will that cause issues? > > Yes, they will. If you want to avoid that, you

[Puppet Users] Testing help for new Augeas Puppet provider which only executes if required

2009-02-18 Thread Bryan Kearney
I apologize for the cross posting, but I would like to hit up folks to test and comment on a new version of the Augeas Puppet provider. You can get it at [1] which is a few day old version of the Puppet code. Added on top of this is a fix to [2] which states that the provider always executes,

[Puppet Users] Re: Augeas type proposal; long.

2009-01-19 Thread Bryan Kearney
Robin Lee Powell wrote: > > Just to be clear: I am offering to write what I describe below if it > seems acceptable to others (and if I get the time). > > I love the idea of Augeas, and I love that Puppet has built-in > support for it. However, I'm finding that I'm routinely unable to > do thin

[Puppet Users] Re: Work in progress: Using augeas to manage /etc/exports

2009-01-16 Thread Bryan Kearney
windowsrefund wrote: > Just a quick update to report that none of the following approaches > result in avoiding duplicate lines from being inserted into /etc/ > exports > > onlyif => "get /files/etc/exports/dir != $name", > > onlyif => "get /files/etc/exports/dir[1] != $name", > > onlyif =>

[Puppet Users] Re: augeas error

2009-01-15 Thread Bryan Kearney
windowsrefund wrote: > augeas { "$name": > context => "/files", > changes => "set /etc/exports/foo bar", > require => File["/etc/exports"], > } > > Augeas will validate the structure of what you are setting. Look in /usr/share/augeas/lenses/exp

[Puppet Users] Re: RPMS of 0.24.7?

2008-12-22 Thread Bryan Kearney
R.I.Pienaar wrote: > Hello, > > - "Todd Zullinger" wrote: > >> windowsrefund wrote: >>> Are they out there somewhere? I don't see anything on EPEL. >> They'll be in epel-testing as soon as the next push is done. >> >> You could grab puppet and ruby-augeas from: >> http://buildsys.fedoraproj

[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

[Puppet Users] Re: more trouble/feedback with augeas & puppet

2008-10-31 Thread Bryan Kearney
Ben wrote: > Bryan Kearney wrote: >> David Lutterkort wrote: >> >>> On Mon, 2008-09-08 at 10:49 -0400, Bryan Kearney wrote: >>> >>>> David Lutterkort wrote: >>>> >>>>> Yeah, Augeas should be able to tell t

[Puppet Users] Have a good workaround for network service on Fedora?

2008-10-17 Thread Bryan Kearney
Has anyone solved status checking for the network service on fedora? Since it always returns success, using 'hastatus => true' does not work. We have some recipes that always cause the network service to restart even when it does not need to. -- bk --~--~-~--~~~--

[Puppet Users] Re: Puppet Augeas Plugin

2008-10-17 Thread Bryan Kearney
Marc Fournier wrote: >>> The patch I sent indeed focused on the need for this workaround. The >>> behaviour of Joel's patch is definitely better. >> >> So.. to verify... you are good? > > Sorry, I wasn't very clear. Yes Joel's patch works fine for me. Great.. thank you for using it and sending a

[Puppet Users] Re: Puppet Augeas Plugin

2008-10-16 Thread Bryan Kearney
Marc Fournier wrote: hmmm. looks like a patch from Marc Fournier attempts to address the same thing and I'm not sure both are necessary (and they conflict in some cases). I suppose it depends on what behavior is appropriate. Marc's patch will not perform the onlyif get/ma

[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney
Bryan Kearney wrote: > Joel Nimety wrote: >> >> >> Bryan Kearney wrote: >>> Joel Nimety wrote: >>> >>> >>> Thank you. I have applied this patch. Please let me know if it works for >>> you. >>> >>> htt

[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney
Joel Nimety wrote: > > > Bryan Kearney wrote: >> Joel Nimety wrote: >> >> >> Thank you. I have applied this patch. Please let me know if it works for >> you. >> >> http://git.et.redhat.com/?p=ace.git;a=commit;h=8c4420ba7c732d039ce6a37fd347437

[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney
Joel Nimety wrote: > resending, not sure the original made it to the mailing list. > > Bryan -- I'm using the puppet augeas plugin at > http://git.et.redhat.com/?p=ace.git;a=blob;f=modules/augeas/plugins/puppet/type/augeas.rb;h=2346c37d724d7607ed4e09b0413700bec2b7cbed;hb=HEAD > > I'm running int

[Puppet Users] Delay the evaluation of a template

2008-10-03 Thread Bryan Kearney
I am running puppet from the command line with no puppet master. My recipe brings up the required services, including network, during execution. I have noticed that at initial boot, if I attempt to refernce the ipaddress or fqdn fact in a template that it will error out. I believe this is beca

[Puppet Users] Re: more trouble/feedback with augeas & puppet

2008-09-08 Thread Bryan Kearney
David Lutterkort wrote: > On Mon, 2008-09-08 at 10:49 -0400, Bryan Kearney wrote: >> David Lutterkort wrote: >>> Yeah, Augeas should be able to tell the caller whether changes were made >>> or not, so that the plugin can suppress spurious reports. This could be &

[Puppet Users] Re: more trouble/feedback with augeas & puppet

2008-09-08 Thread Bryan Kearney
David Lutterkort wrote: > On Fri, 2008-09-05 at 12:07 +0200, Marc Fournier wrote: >> The root of my problem was indeed to avoid having augeas update the value >> if it was already set to what it was supposed to be. The idea behind this >> was to avoid triggering notices in puppet at each run: >> >