RE: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Sukh Khehra
Message- From: Silviu Paragina [mailto:sil...@paragina.ro] Sent: Wednesday, June 16, 2010 11:31 AM To: puppet-users@googlegroups.com Cc: Sukh Khehra Subject: Re: [Puppet Users] augeas and sendmail aliases Search in the list history for a thread named augeas type and /etc/services Silviu

Re: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Silviu Paragina
and as expected did not see a subtree numbered at 01 so thought I should be be able to do this. Any other suggestions? -Original Message- From: Silviu Paragina [mailto:sil...@paragina.ro] Sent: Wednesday, June 16, 2010 11:31 AM To: puppet-users@googlegroups.com Cc: Sukh Khehra Subject: Re: [Puppet Users

Re: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Rob McBroom
On Jun 16, 2010, at 3:02 PM, Sukh Khehra wrote: Yes, I read that thread and thought I was ensuring path uniqueness by inserting the string 01 in there but its not working for me. I examined the tree using augtool and as expected did not see a subtree numbered at 01 so thought I should be be

Re: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Silviu Paragina
On 16.06.2010 23:45, Rob McBroom wrote: On Jun 16, 2010, at 3:02 PM, Sukh Khehra wrote: Yes, I read that thread and thought I was ensuring path uniqueness by inserting the string 01 in there but its not working for me. I examined the tree using augtool and as expected did not see a subtree

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Christopher Johnston
I tried using the alias option as an identifier, but have not been succesful with it. I will play that a little bit more as I think that may be the only way to do it that I know of. On Thu, Jun 3, 2010 at 10:55 PM, Rob McBroom mailingli...@skurfer.comwrote: On Jun 3, 2010, at 3:05 PM,

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Rob McBroom
On Jun 4, 2010, at 10:20 AM, Christopher Johnston wrote: I tried using the alias option as an identifier, but have not been succesful with it. I will play that a little bit more as I think that may be the only way to do it that I know of. It looks like you can use the port/protocol

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Rob McBroom
These types of paths seem to match the correct thing as well: /files/etc/services/service-name[port = '443' and protocol = 'tcp'] /files/etc/services/*[port = '443' and protocol = 'tcp'] Maybe you should just take a look at http://augeas.net/page/Path_expressions. -- Rob McBroom

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Christopher Johnston
Let me give this a whirl will let you know how I make out On Fri, Jun 4, 2010 at 10:42 AM, Rob McBroom mailingli...@skurfer.comwrote: These types of paths seem to match the correct thing as well: /files/etc/services/service-name[port = '443' and protocol = 'tcp']

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Christopher Johnston
What version of augeas are you using? I am on 0.5.3 I don't think support has been added to do some of that functionality I am going to upgrade On Fri, Jun 4, 2010 at 10:33 AM, Rob McBroom mailingli...@skurfer.comwrote: On Jun 4, 2010, at 10:20 AM, Christopher Johnston wrote: I tried using

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Rob McBroom
On Jun 4, 2010, at 11:55 AM, Christopher Johnston wrote: What version of augeas are you using? I am on 0.5.3 I don't think support has been added to do some of that functionality I am going to upgrade 0.7.0 -- Rob McBroom http://www.skurfer.com/ -- You received this message because you

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Christopher Johnston
I tested the new version from the CLI, I noticed it is quite different and more powerful features. But I wonder if puppet has caught to support them in the augeas provider. If I set this below it fails and either operation. changes = [set service-name[port = '7302'][protocol = 'tcp']/port

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Rob McBroom
On Jun 4, 2010, at 1:03 PM, Christopher Johnston wrote: I tested the new version from the CLI, I noticed it is quite different and more powerful features. But I wonder if puppet has caught to support them in the augeas provider. If I set this below it fails and either operation. Be sure

Re: [Puppet Users] augeas type and /etc/services

2010-06-04 Thread Christopher Johnston
Yup, I am on the latest and greatest as well as an attempted git checkout of ruby-augeas, still no good. Also on the latest .25.5 stable of puppet. ruby-augeas-0.3.0-1.fc10.x86_64 augeas-0.7.1-1.fc10.x86_64 augeas-libs-0.7.1-1.fc10.x86_64 On Fri, Jun 4, 2010 at 1:16 PM, Rob McBroom

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Christopher Johnston
# puppet -ddd foo1.pp Could not parse for environment production: Syntax error at 'set /files/etc/services/service-name[port = '1002'] app_tcp'; expected ']' at /data/foo1.pp:5 I don't believe that works... On Wed, Jun 2, 2010 at 10:59 PM, Rob McBroom mailingli...@skurfer.comwrote: On Jun 2,

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Christopher Johnston
Duh sorry I added commas for the array... stil the same error. I dont think that will work since the entries in the services file are usually like this: augtool print /files/etc/services/service-name[1] /files/etc/services/service-name[1] = tcpmux /files/etc/services/service-name[1]/port = 1

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Rob McBroom
On Jun 3, 2010, at 12:04 PM, Christopher Johnston wrote: # puppet -ddd foo1.pp Could not parse for environment production: Syntax error at 'set /files/etc/services/service-name[port = '1002'] app_tcp'; expected ']' at /data/foo1.pp:5 It looks like you're trying to use single-quotes (for

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Christopher Johnston
I tried mixing/matching quotes, if I double quote just the set statement and quote nothing else it goes through but nothing gets changed. for eg: set service-name[port = 7302]/port 7302, debug: Augeas[cti-p01-dgw_udp](provider=augeas): Skipping becuase no files were changed Now if I single

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Rob McBroom
On Jun 3, 2010, at 1:40 PM, Christopher Johnston wrote: Now if I single quote the port number in the [] I get another error.. which likely means using the '' is not correct. err: //Augeas[cti-p01-dgw_tcp]/returns: change from need_to_run to 0 failed: Save failed with return code false

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Christopher Johnston
I am on 25.4... On Thu, Jun 3, 2010 at 1:59 PM, Rob McBroom mailingli...@skurfer.comwrote: On Jun 3, 2010, at 1:40 PM, Christopher Johnston wrote: Now if I single quote the port number in the [] I get another error.. which likely means using the '' is not correct. err:

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Rob McBroom
You had to make me actually try it in Puppet, huh? ;) My original example was missing commas after the various set statements. Not sure if you fixed that. It also specified the full path, even though the context should have taken care of most of it. That didn't seem to hurt, but to be safe, I

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Christopher Johnston
HA, yes I added commas. You know what the problem was, my ordering. I had app_tcp first and not port 1002 so thats likely why it was not getting picked up. Worked, but hit another snag. Now try adding another app name, same port but for udp, it will just get overwritten. -Chris On Thu, Jun

Re: [Puppet Users] augeas type and /etc/services

2010-06-03 Thread Rob McBroom
On Jun 3, 2010, at 3:05 PM, Christopher Johnston wrote: You know what the problem was, my ordering. I had app_tcp first and not port 1002 so thats likely why it was not getting picked up. Worked, but hit another snag. Now try adding another app name, same port but for udp, it will just

Re: [Puppet Users] augeas type and /etc/services

2010-06-02 Thread Rob McBroom
On Jun 2, 2010, at 4:03 PM, Christopher Johnston wrote: Has anyone attempted to use the augeas type to add a service? I got the service to add no problem, but having some difficulties to get the match to work to prevent duplicate entries from adding. Since the service-name[*] has endless

[Puppet Users] Augeas in puppet behaves differently than augtool?

2010-05-20 Thread Tim Stoop
Hi all, I'm trying to do fairly simple stuff with augeas, like: augeas { cronapt - mailon: context = /files/etc/cron-apt/config, changes = set MAILON upgrade, onlyif = match MAILON != ['upgrade'], } This works if I try it from the commandline: t...@puppet-test.db:~$ sudo augtool augtool

Re: [Puppet Users] Augeas in puppet behaves differently than augtool?

2010-05-20 Thread Patrick
On May 20, 2010, at 6:10 AM, Tim Stoop wrote: Hi all, I'm trying to do fairly simple stuff with augeas, like: augeas { cronapt - mailon: context = /files/etc/cron-apt/config, changes = set MAILON upgrade, onlyif = match MAILON != ['upgrade'], } This works if I try it from the

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-26 Thread Rob McBroom
On Feb 24, 2010, at 6:32 PM, David Lutterkort wrote: On Tue, 2010-02-23 at 14:02 -0500, Rob McBroom wrote: I’d love to hear there’s a way (in 0.24.8). I'd wager that the problem was that you were missing an onlyif that would keep the changes from being applied when the entries are there

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-24 Thread David Lutterkort
On Tue, 2010-02-23 at 14:02 -0500, Rob McBroom wrote: On Feb 23, 2010, at 7:37 AM, Jesús Couto wrote: On a tangent, anybody using augeas under puppet to manage /etc/sudoers? ... and how? I tried, but all I could get it to do was add the entries to the end of `/etc/sudoers` over and

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-23 Thread Paul Elliott
Hi David, On 22/02/10 19:25, David Lutterkort wrote: You can do this by looking for the entries with a single path expression: augtool match /files/etc/hosts/*[ipaddr = '127.0.1.1'] gives you all entries in /etc/hosts with that IP. To remove them, just do 'rm' instead of 'match'.

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-23 Thread Jesús Couto
On a tangent, anybody using augeas under puppet to manage /etc/sudoers? ... and how? I was thinking about doing so to add/delete several commands to an administrator group as part of setting up an apache/tomcat/whatever instance, but cant figure out how to do it, for reasons similar to this

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-23 Thread Rob McBroom
On Feb 23, 2010, at 7:37 AM, Jesús Couto wrote: On a tangent, anybody using augeas under puppet to manage /etc/sudoers? ... and how? I tried, but all I could get it to do was add the entries to the end of `/etc/sudoers` over and over every 30 minutes. I gave up and made a define that calls

Re: [Puppet Users] Augeas type: Removing an entry from /etc/hosts

2010-02-22 Thread David Lutterkort
On Mon, 2010-02-22 at 16:23 +, Paul Elliott wrote: I'm just starting to look at using Augeas with Puppet to manage some of our configuration files. I thought I would start with a simple task of removing an entry from the /etc/hosts file. I'm not finding it simple though! We have a

Re: [Puppet Users] Augeas pam.d argument checking

2010-02-22 Thread David Lutterkort
On Sun, 2010-02-21 at 15:06 -0500, Joe McDonagh wrote: I have not thought about using augeas because last time I tried to build it for our standard OS (Ubuntu 8.04) IIRC it needed a newer version of glibc. I haven't seen that problem - but if you run into it again, I'd very much appreciate

Re: [Puppet Users] Augeas pam.d argument checking

2010-02-22 Thread Joe McDonagh
David Lutterkort wrote: On Sun, 2010-02-21 at 15:06 -0500, Joe McDonagh wrote: I have not thought about using augeas because last time I tried to build it for our standard OS (Ubuntu 8.04) IIRC it needed a newer version of glibc. I haven't seen that problem - but if you run into it

Re: [Puppet Users] Augeas pam.d argument checking

2010-02-21 Thread Joe McDonagh
David Lutterkort wrote: On Thu, 2010-02-18 at 18:33 -0500, Joe McDonagh wrote: I created a ticket about a pam type nearly a year ago and hopefully I can have a working type with the parsedfile provider sometime within the next week (I should have a real-live day off Friday). I did do some

Re: [Puppet Users] Augeas pam.d argument checking

2010-02-19 Thread David Lutterkort
On Thu, 2010-02-18 at 18:33 -0500, Joe McDonagh wrote: I created a ticket about a pam type nearly a year ago and hopefully I can have a working type with the parsedfile provider sometime within the next week (I should have a real-live day off Friday). I did do some planning for type

[Puppet Users] Augeas pam.d argument checking

2010-02-18 Thread Ed
I'm trying to change the password complexity requirements in pam.d/system-auth using augeas. I can append the values (lcredit=-1, ucredit=-1, etc) onto the correct place, but if another value is already present (i.e. lcredit=-2), the onlyif match statement doesn't seem to support checking regular

[Puppet Users] Augeas : how to set a string value containing spaces ?

2009-10-09 Thread Rino
Hi, We've run into a problem with augeas while trying to update a netwok configuration file : for instance, we would like to set ETHTOOL_OPTS to autoneg on but the result is ETHTOOL_OPTS=autoneg in the file (the on part is not written). Is there a way to escape the space to get the correct

[Puppet Users] Augeas and grub.conf

2009-07-31 Thread Trevor Hemsley
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: context = /files/boot/grub/grub.conf,

[Puppet Users] Augeas type proposal; long.

2009-01-18 Thread Robin Lee Powell
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 things with the Puppet Augeas type that I

[Puppet Users] augeas error

2009-01-15 Thread windowsrefund
augeas { $name: context = /files, changes = set /etc/exports/foo bar, require = File[/etc/exports], } As you can see, I've got a very simple resource defined for testing purposes but am seeing this error on the client. Can someone point me in

<    1   2   3