[Puppet Users] Augeas file line edit please help

2013-01-23 Thread kdo
what i thought would be a simple edit using augeas is turning out to not be so straight forward, can anyone please help ? the plan is to edit sendmail.cf and change the default DS to DShostname.domain class mail { $key = DS service { 'sendmail':; } augeas {

[Puppet Users] augeas sudoer syntax help

2012-12-18 Thread Craig Cook
I have a manifest like this class sudoer::spectrum {     augeas { sudoer_spectrum_cmdalias:     context = /files/etc/sudoers,     changes = [     set Cmnd_Alias[alias/name = 'SPECTRUM_CMDS']/alias/name SPECTRUM_CMDS,     set Cmnd_Alias[alias/name =

Re: [Puppet Users] Augeas and custom lenses?

2012-11-07 Thread Dominic Cleal
On 06/11/12 22:31, Jakov Sosic wrote: Hi I want to modify one of the existing lenses to better suit my needs, but I don't know where to put it on the filesystem? It seems wrong to overwrite file in /usr/share/augeas/lenses/dist or to rebuild augeas-libs, is there any other way to

[Puppet Users] augeas syntax for adding similar lines to hosts.allow

2012-11-06 Thread Chad Lewis
I've found a similar thread here, but it doesn't do quite what I need. https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/VMloh1KrSew I have multiple lines of the form below in hosts.allow: sshd,sshd2: 1.1.1.1 sshd,sshd2: 2.2.2.2 etc. I'm struggling with the syntax to add yet

[Puppet Users] Augeas and custom lenses?

2012-11-06 Thread Jakov Sosic
Hi I want to modify one of the existing lenses to better suit my needs, but I don't know where to put it on the filesystem? It seems wrong to overwrite file in /usr/share/augeas/lenses/dist or to rebuild augeas-libs, is there any other way to distribute modifications of existing lenses or

Re: [Puppet Users] Augeas and custom lenses?

2012-11-06 Thread Ian Mortimer
On 07/11/12 08:31, Jakov Sosic wrote: I want to modify one of the existing lenses to better suit my needs, but I don't know where to put it on the filesystem? I build an rpm which installs custom lenses in /usr/share/augeas/lenses It seems wrong to overwrite file in

Re: [Puppet Users] augeas only add if doesn't exist

2012-10-16 Thread Dominic Cleal
On 15/10/12 16:52, Eugene Vilensky wrote: On Oct 14, 2012, at 12:40 PM, Dominic Cleal dcl...@redhat.com mailto:dcl...@redhat.com wrote: You're missing quotes around nrpe, the command should be: set /files/etc/hosts.allow/*[process='nrpe']/client[last()+1] 1.1.1.1 rodjek's example has

Re: [Puppet Users] augeas only add if doesn't exist

2012-10-16 Thread Dominic Cleal
On 16/10/12 11:42, Dominic Cleal wrote: On 15/10/12 16:52, Eugene Vilensky wrote: On Oct 14, 2012, at 12:40 PM, Dominic Cleal dcl...@redhat.com mailto:dcl...@redhat.com wrote: You're missing quotes around nrpe, the command should be: set

Re: [Puppet Users] augeas only add if doesn't exist

2012-10-15 Thread Eugene Vilensky
On Oct 14, 2012, at 12:40 PM, Dominic Cleal dcl...@redhat.com wrote: You're missing quotes around nrpe, the command should be: set /files/etc/hosts.allow/*[process='nrpe']/client[last()+1] 1.1.1.1 rodjek's example has the quotes in, so just a transcription error. Totally works for an

Re: [Puppet Users] augeas only add if doesn't exist

2012-10-14 Thread Dominic Cleal
On 24/09/12 19:03, Eugene Vilensky wrote: Hello, I'm trying to add an entry to /etc/hosts.allow only if the entry for 'client' (daemon) does not already exit. In this #puppet log: http://www.puppetlogs.com/puppet/%23puppet-2012-05-03.log.html rodjek links a gist which should do exactly

[Puppet Users] augeas only add if doesn't exist

2012-09-24 Thread Eugene Vilensky
Hello, I'm trying to add an entry to /etc/hosts.allow only if the entry for 'client' (daemon) does not already exit. In this #puppet log: http://www.puppetlogs.com/puppet/%23puppet-2012-05-03.log.html rodjek links a gist which should do exactly that: https://gist.github.com/18c50d8800840696bac0

[Puppet Users] augeas and cron.allow

2012-08-29 Thread Greenhalgh, Mark
Hi. I am having a few problems with augeas and need some help. What I am trying to use is augeas to update the cron.allow file. I can get augeas to add the required name but I am having problems with getting it to add the name once. augeas { check_mk_cron.allow :

Re: [Puppet Users] Augeas fails to set BONDING_OPTS with return code false

2012-06-28 Thread Dominic Cleal
Hi Trey, On 23/06/12 23:37, treydock wrote: I'm attempting to manage my network interfaces through a homebrew module that takes input from hiera, and then uses augeas to define each ifcfg-*. Example: ... set BONDING_OPTS '\mode=${mode} miimon=${miimon}\', This looks good to me. The

[Puppet Users] Augeas fails to set BONDING_OPTS with return code false

2012-06-23 Thread treydock
I'm attempting to manage my network interfaces through a homebrew module that takes input from hiera, and then uses augeas to define each ifcfg-*. Example: /* Set manditory parameters */ augeas { eth_bond_${name} : context = /files/etc/sysconfig/network-scripts/ifcfg-${name}, changes

Re: [Puppet Users] Augeas fails to set BONDING_OPTS with return code false

2012-06-23 Thread Christopher Wood
netmark? On Sat, Jun 23, 2012 at 02:37:04PM -0700, treydock wrote:       set NETMARK ${netmask}, -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this

Re: [Puppet Users] Augeas fails to set BONDING_OPTS with return code false

2012-06-23 Thread treydock
Wow...can we permanency delete this post? Haha, I've been staring at Puppet modules for a week straight, it's always a spelling error. Thanks! - Trey On Saturday, June 23, 2012 5:34:53 PM UTC-5, Christopher Wood wrote: netmark? On Sat, Jun 23, 2012 at 02:37:04PM -0700, treydock wrote:

Re: [Puppet Users] Augeas resources not being saved

2012-06-20 Thread Dominic Cleal
On 19/06/12 22:02, Guy Knights wrote: I can now confirm that Dominic was correct. I'm upgraded to puppet 2.7.16 now and the augeas resources are working. One thing I can also confirm is that Alan's observation about the context not working and to use the full path in the set command was also

Re: [Puppet Users] Augeas resources not being saved

2012-06-20 Thread Guy Knights
Oh ok, thanks Dominic. I'll give that a go. Regards, Guy On Wed, Jun 20, 2012 at 1:37 AM, Dominic Cleal dcl...@redhat.com wrote: On 19/06/12 22:02, Guy Knights wrote: I can now confirm that Dominic was correct. I'm upgraded to puppet 2.7.16 now and the augeas resources are working. One

Re: [Puppet Users] Augeas resources not being saved

2012-06-19 Thread Guy Knights
That looks like the issue then. We're using augeas 0.10 (default with ubuntu 10.04) and puppet 2.7.3. I'll look at upgrading puppet and see how that goes. Thanks all, Guy On Saturday, June 16, 2012 12:45:54 AM UTC-7, Dominic Cleal wrote: On 15/06/12 22:42, Guy Knights wrote: Ok, thanks

Re: [Puppet Users] Augeas resources not being saved

2012-06-19 Thread Guy Knights
Sorry, never mind this. I discovered that the source version of puppet was install in /usr/local/libs/site_ruby while the repository version appears to have been installed in /usr/lib/ruby1.8. On Tue, Jun 19, 2012 at 12:41 PM, Guy Knights g...@eastsidegamestudio.comwrote: Hi again, I

Re: [Puppet Users] Augeas resources not being saved

2012-06-19 Thread Guy Knights
Hi again, I attempted to upgrade puppet from the office Puppet apt repository today, previously it had been installed from source. I just installed the package over the top, thinking it would overwrite the existing files. However, when I run puppet --version it still spits out 2.7.3. I looked

Re: [Puppet Users] Augeas resources not being saved

2012-06-19 Thread Guy Knights
I can now confirm that Dominic was correct. I'm upgraded to puppet 2.7.16 now and the augeas resources are working. One thing I can also confirm is that Alan's observation about the context not working and to use the full path in the set command was also correct, at least for the sudoers config

Re: [Puppet Users] Augeas resources not being saved

2012-06-16 Thread Dominic Cleal
On 15/06/12 22:42, Guy Knights wrote: Ok, thanks for your help Alan. BTW, I forgot include our puppet version - it's 2.7.0. Which version of Augeas are you using? There's a bug if you're using Augeas 0.10.0 with any version of Puppet before 2.7.10 where it won't save the resource. You'll need

[Puppet Users] Augeas resources not being saved

2012-06-15 Thread Guy Knights
I've recently configured a couple of augeas resources, one for a php.ini file and one for sudoers, however neither set of changes is being saved. I have no idea why. The sudoers resource is here: augeas { 'set_sudoers': context= '/files/etc/sudoers/spec[user=%sudo]', changes

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Alan Evans
Guy, Check the debug output of the agent. puppetd --debug or puppet agent --debug (I think) Or try running the same set with augtool from the command line. # augtool --noload augtool set /files/etc/php5/fpm/php.ini/PHP/error_log /var/log/php/php.log augtool print /augeas//error See what the

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Guy Knights
Yeah, I tried --debug in my puppet command and it didn't give me any errors. In my original message i did say I tried doing the set from augtool and it worked, but I just tried it again with augtool --noload and it can't find anything to do with the sudoers file. It's like it's not reading the

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Alan Evans
Guy, The way augeas works is each lens has filters for which files it should include and exclude. The --noload switch tells augtool not to automatically load the lenses in /usr/share/augeas/ so it does not see these filters. You then have to manually load a lens and tell it which files to

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Guy Knights
Ok, thanks for the info. Are you implying that the puppet augeas resource type acts in '--noload' mode, then? I tried doing the fully qualified set statement but it still does nothing, unfortunately. On Fri, Jun 15, 2012 at 2:20 PM, Alan Evans alanwev...@gmail.com wrote: Guy, The way augeas

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Alan Evans
From what I understand if you use the 'lens' attribute on the augeas resource type the augeas ruby library does essentially the same thing as --noload for augtool. Otherwise (unless its been fixed) every time you use the augeas resource it opens the augeas-ruby library which parses all lenses

Re: [Puppet Users] Augeas resources not being saved

2012-06-15 Thread Guy Knights
Ok, thanks for your help Alan. BTW, I forgot include our puppet version - it's 2.7.0. Cheers, Guy On Fri, Jun 15, 2012 at 2:40 PM, Alan Evans alanwev...@gmail.com wrote: From what I understand if you use the 'lens' attribute on the augeas resource type the augeas ruby library does essentially

[Puppet Users] Augeas Arrays

2012-05-28 Thread steve foster
Hi Folks, I'm trying to figure our why if I pass an array to a augeas resource type it ends up being concatenated eg for the following example I would expect 2 firewall rules, but instead I get one rule with the dport = 17001701 class {'test': port= ['1700', '1701'], } class test

[Puppet Users] augeas-0.10.0_1 in FreeBSD can't see /etc/rc.conf

2012-05-01 Thread Darryl Wisneski
Howdy: Since I upgraded some of my FreeBSD boxen to augeas-0.10.0* I can't get augeas to address /etc/rc.conf. I was able to modify key/values in /etc/rc.conf in augeas-0.7.1_2 in my puppet classes and augtool. I think I recall Dominic saying that the /etc/rc.conf lens was added by the FreeBSD

Re: [Puppet Users] augeas-0.10.0_1 in FreeBSD can't see /etc/rc.conf

2012-05-01 Thread Dominic Cleal
Hi Darryl, On 01/05/12 16:11, Darryl Wisneski wrote: Since I upgraded some of my FreeBSD boxen to augeas-0.10.0* I can't get augeas to address /etc/rc.conf. I was able to modify key/values in /etc/rc.conf in augeas-0.7.1_2 in my puppet classes and augtool. I think I recall Dominic saying

Re: [Puppet Users] augeas-0.10.0_1 in FreeBSD can't see /etc/rc.conf

2012-05-01 Thread Darryl Wisneski
Hi Dominic: On Tue, May 01, 2012 at 09:01:16PM +0100, Dominic Cleal wrote: Hi Darryl, On 01/05/12 16:11, Darryl Wisneski wrote: Since I upgraded some of my FreeBSD boxen to augeas-0.10.0* I can't get augeas to address /etc/rc.conf. I was able to modify key/values in /etc/rc.conf in

[Puppet Users] Augeas EL6 RPMs

2012-03-26 Thread Eugene Vilensky
Hello, the puppetlabs yum repo provides a later version of Augeas for EL5 users but not for EL6. Does anyone currently build the latest Augeas for EL6? Thank you, Eugene -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group,

Re: [Puppet Users] Augeas question ab

2012-02-17 Thread Dominic Cleal
On 15/02/12 08:10, Steve Shipway wrote: This is only a guess, but is Augeas doing a STRING comparison of the values instead of a NUMERICAL one? String-wise, 7000 80 but numerically it's the other way around. Can you try setting the current value to '1' and see if Augeas wants to

RE: [Puppet Users] Augeas question ab

2012-02-15 Thread Steve Shipway
: +64 9 373 7599 ext 86487 From: puppet-users@googlegroups.com [puppet-users@googlegroups.com] on behalf of rvlinden [rene.vanderlinde...@gmail.com] Sent: Wednesday, 15 February 2012 10:26 a.m. To: Puppet Users Subject: [Puppet Users] Augeas question ab Hi

[Puppet Users] Augeas fstab question

2012-02-10 Thread Joe
I'm trying to add a mount option using puppet/augeas. Something like: class acl { augeas { var_fs_acl: context = /files/etc/fstab, changes = [ins opt after *[file='/var']/ opt[last()], set *[file='/var']/opt[last()] acl],

Re: [Puppet Users] Augeas fstab question

2012-02-10 Thread Christopher Wood
Try the mount type? http://docs.puppetlabs.com/references/stable/type.html#mount (Any particular reason for using augeas?) On Fri, Feb 10, 2012 at 12:10:56PM -0800, Joe wrote: I'm trying to add a mount option using puppet/augeas. Something like: class acl { augeas { var_fs_acl:

Re: [Puppet Users] Augeas fstab question

2012-02-10 Thread David Rolston
On Fri, Feb 10, 2012 at 12:15 PM, Christopher Wood christopher_w...@pobox.com wrote: Try the mount type? http://docs.puppetlabs.com/references/stable/type.html#mount (Any particular reason for using augeas?) On Fri, Feb 10, 2012 at 12:10:56PM -0800, Joe wrote: I'm trying to add a mount

Re: [Puppet Users] Augeas fstab question

2012-02-10 Thread Dominic Cleal
On 10/02/12 20:10, Joe wrote: I'm trying to add a mount option using puppet/augeas. Something like: class acl { augeas { var_fs_acl: context = /files/etc/fstab, changes = [ins opt after *[file='/var']/ opt[last()], set

Re: [Puppet Users] Augeas lens for zabbix agent config files?

2012-01-23 Thread Dominic Cleal
Hi Walter, [ CCing the augeas-devel list, as that's the best place for Augeas lens problems and help ] On 22/01/12 20:48, Walter Heck wrote: Hi all, I'm trying to come up with a lens for the zabbix agent config files. I find the lens language untransparent at best, so I'm struggeling to

Re: [Puppet Users] Augeas lens for zabbix agent config files?

2012-01-23 Thread Walter Heck
Thanks for the pointers Dominic, I'll check them out later this week and report back with my findings! On Mon, Jan 23, 2012 at 11:34, Dominic Cleal dcl...@redhat.com wrote: Hi Walter, [ CCing the augeas-devel list, as that's the best place for Augeas lens problems and help ] On 22/01/12

[Puppet Users] Augeas lens for zabbix agent config files?

2012-01-22 Thread Walter Heck
Hi all, I'm trying to come up with a lens for the zabbix agent config files. I find the lens language untransparent at best, so I'm struggeling to figure out what's up. The debugging possibilities are extremely limited. Here's what I have now: zabbix.aug: (** An adjusted copy of the

[Puppet Users] augeas error: Could not evaluate: unknown error - Failed to initialize Augeas

2012-01-11 Thread Lawrie Care
Hi, I am running puppet 2.6.12 on a SLES11SP1 server. I get the following error message as part of the puppet catalog run on a SLED11SP1 client. Augeas[sap_host_entries](provider=augeas): Opening augeas with root /, lens path , flags 0 err: /Stage[main]/Sap/Augeas[sap_host_entries]: Could not

Re: [Puppet Users] augeas error: Could not evaluate: unknown error - Failed to initialize Augeas

2012-01-11 Thread R.I.Pienaar
- Original Message - augeas-devel-0.8.1-7.8.2 libaugeas0-0.8.1-7.8.2 ruby-devel-1.8.7.p72-5.30.5 rubygem-rake-0.8.7-0.1.4 ruby-1.8.7.p72-5.30.5 rubygems-1.3.7-1.3.3 also need the augeas ruby bindings -- You received this message because you are subscribed to the

[Puppet Users] augeas modify pam.d argument by relative position

2011-08-06 Thread Tim Mooney
All- I've been using puppet (now 2.6.9) and augeas (now 0.7.2 + ruby-augeas 0.3.0) for a few weeks and I'm a convert. I'm trying to modify a particular argument to a particular entry in the RHEL 6.1 /etc/pam.d/password-auth-ac file, and although I've come up with a way that works, it's

Re: [Puppet Users] Augeas match Puppet

2011-06-29 Thread Rob McBroom
On Jun 6, 2011, at 9:45 PM, Michael Knox wrote: The following works ... onlyif= match FW_CONFIGURATIONS_EXT/value[.='$svc'] size == 0, Couldn’t you just do this and not have to deal with “onlyif” at all? set FW_CONFIGURATIONS_EXT/value[.='$svc'] $svc Read the section of the wiki

[Puppet Users] Augeas match Puppet

2011-06-06 Thread Michael Knox
Hi, I'm working on a type to undertake some very simple management of the SuSE firewall service (/etc/sysconfig/SuSEfirewall2), specifcally I need to manage the contents of the list FW_CONFIGURATIONS_EXT which is handled as a shell list. I've been able to use the shellvars_list.aug to manage the

Re: [Puppet Users] Augeas match Puppet

2011-06-06 Thread Aaron Grewell
I found this Wiki article tremendously valuable when dealing with Augeas. http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas On Mon, Jun 6, 2011 at 3:45 PM, Michael Knox michael.knox...@gmail.comwrote: Hi, I'm working on a type to undertake some very simple management of the

Re: [Puppet Users] Augeas match Puppet

2011-06-06 Thread Michael Knox
Thanks Aaron, I reread that and this time found the snippet I needed ... The following works ... onlyif= match FW_CONFIGURATIONS_EXT/value[.='$svc'] size == 0, Cheers On 7 June 2011 08:51, Aaron Grewell aaron.grew...@gmail.com wrote: I found this Wiki article tremendously valuable when

Re: [Puppet Users] augeas slooow

2011-05-06 Thread Dominic Cleal
On 05/05/11 15:43, Patrick wrote: On May 5, 2011, at 6:28 AM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI wrote: Hi, Aaron. Aaron (quoting letter@): To avoid that, I added 'lens' and 'incl' parameters to the puppet type a while ago. If you set these, Augeas will only read a specific file,

RE: [Puppet Users] augeas slooow

2011-05-05 Thread Jennings, Jared L CTR USAF AFMC 46 SK/CCI
Hi, Aaron. Aaron (quoting letter@): To avoid that, I added 'lens' and 'incl' parameters to the puppet type a while ago. If you set these, Augeas will only read a specific file, avoiding most of the unnecessary overhead. ... everything will be lightning fast, even without connection caching.

Re: [Puppet Users] augeas slooow

2011-05-05 Thread Patrick
On May 5, 2011, at 6:28 AM, Jennings, Jared L CTR USAF AFMC 46 SK/CCI wrote: Hi, Aaron. Aaron (quoting letter@): To avoid that, I added 'lens' and 'incl' parameters to the puppet type a while ago. If you set these, Augeas will only read a specific file, avoiding most of the unnecessary

Re: [Puppet Users] augeas slooow

2011-05-03 Thread Aaron Lippold
From a previous email of let...@repeat.com. ... To avoid that, I added 'lens' and 'incl' parameters to the puppet type a while ago. If you set these, Augeas will only read a specific file, avoiding most of the unnecessary overhead. So, you should say something like augeas { add_a_host: changes

Re: [Puppet Users] augeas, rhel6, setm

2011-04-13 Thread Dominic Cleal
On 28/03/11 08:54, hai wu wrote: It turns out augeas on RHEL6 is 0.7.2, which does not have 'setm' command available. 'setm' is available in augeas release 0.8, which is available in EPEL, but not available for RHEL6 (the reason is the package is already in RHEL6, thus no package would be

Re: [Puppet Users] augeas, rhel6, setm

2011-04-13 Thread hai wu
Thanks, but this would not work here, where we need 2 console (one for tty0, one for ttyS1). Augeas could handle in this case .. On Wed, Apr 13, 2011 at 6:40 AM, Dominic Cleal dcl...@redhat.com wrote: On 28/03/11 08:54, hai wu wrote: It turns out augeas on RHEL6 is 0.7.2, which does not have

[Puppet Users] augeas, rhel6, setm

2011-03-28 Thread hai wu
It turns out augeas on RHEL6 is 0.7.2, which does not have 'setm' command available. 'setm' is available in augeas release 0.8, which is available in EPEL, but not available for RHEL6 (the reason is the package is already in RHEL6, thus no package would be released in EPEL for this. All I want to

[Puppet Users] augeas match != bug

2011-03-25 Thread hai wu
This bug at http://projects.puppetlabs.com/issues/5211 is showing as 'Closed', but I am still hitting it with Puppet 2.6.7-1 on RHEL6 (ruby 1.8.7). For /etc/security/limits.conf, got some error using almost the same code as here:

Re: [Puppet Users] augeas slooow

2011-03-22 Thread saurabh verma
How can I profile my Puppet catalog, to see what resources take the longest to set straight? (I've only got puppet apply for now - no master yet) -- +1 for profiling feature -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to

Re: [Puppet Users] augeas slooow

2011-03-22 Thread Nigel Kersten
On Tue, Mar 22, 2011 at 1:24 PM, saurabh verma nitw.saur...@gmail.com wrote: How can I profile my Puppet catalog, to see what resources take the longest to set straight? (I've only got puppet apply for now - no master yet) -- +1 for profiling feature More than --evaltrace ? -- You

RE: [Puppet Users] augeas slooow

2011-03-22 Thread Jennings, Jared L CTR USAF AFMC 46 SK/CCI
: [Puppet Users] augeas slooow On Tue, Mar 22, 2011 at 1:24 PM, saurabh verma nitw.saur...@gmail.com wrote: How can I profile my Puppet catalog, to see what resources take the longest to set straight? (I've only got puppet apply for now - no master yet) -- +1 for profiling

[Puppet Users] augeas - add to beginning of file

2011-02-24 Thread cyrus
Hi: Using augeas, how do you add a comment to the beginning of a file. I know you can use ins but you need to specify a path to insert before or after. In my case I can't with 100% certainty say I will no what the first line. -- You received this message because you are subscribed to the Google

[Puppet Users] augeas lenses for splunk ?

2011-01-27 Thread Mohamed Lrhazi
Hello, Anyone wrote or uses augeas to manage splunk config files and care to share them? Thanks a lot. Mohamed. -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe

[Puppet Users] Augeas input needed

2011-01-27 Thread Matthew Ceroni
I am using augeas to update the PAM configuration (ie: to LDAP enable my systems). Here is a snippet of what I am doing to add required modules, etc. auth-pam_succeed: context = /files/etc/pam.d/system-auth,

Re: [Puppet Users] Augeas input needed

2011-01-27 Thread Rob McBroom
On Jan 27, 2011, at 3:16 PM, Matthew Ceroni wrote: I am using augeas to update the PAM configuration (ie: to LDAP enable my systems). … My question is, is there a simpler way to do what I am doing. Meaning can I combine all these seperate calls into one? You didn’t say what OS this is

Re: [Puppet Users] Augeas not saving changes

2010-12-03 Thread Patrick
On Dec 2, 2010, at 1:03 PM, Sid wrote: ruby: 1.8.7.302-4 ruby-augeas: 0.3.0-1.el5 (EPEL) augeas-libs: 0.7.3-1.el5 (EPEL) puppet: 2.6.4 I am unable to get Puppet/Augeas to update the sysctl.conf file when using the following configuration. I have tested changing the file with augtool and

[Puppet Users] Augeas not saving changes

2010-12-02 Thread Sid
ruby: 1.8.7.302-4 ruby-augeas: 0.3.0-1.el5 (EPEL) augeas-libs: 0.7.3-1.el5 (EPEL) puppet: 2.6.4 I am unable to get Puppet/Augeas to update the sysctl.conf file when using the following configuration. I have tested changing the file with augtool and that works. Puppet fails silently though.

[Puppet Users] augeas / sudoers

2010-11-19 Thread walexey
Hello everybody! How can i create with puppet following sudoers file: User_Alias CENTREON=apache,nagios CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload CENTREON ALL = NOPASSWD: /usr/bin/nagios* -v * The problem that augeas

Re: [Puppet Users] augeas / sudoers

2010-11-19 Thread Dan Bode
Hi, On Fri, Nov 19, 2010 at 4:50 AM, walexey wale...@gmail.com wrote: Hello everybody! How can i create with puppet following sudoers file: User_Alias CENTREON=apache,nagios CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart CENTREON ALL = NOPASSWD: /etc/init.d/nagios* reload

Re: [Puppet Users] augeas / sudoers

2010-11-19 Thread Andrew Heagle
On Friday, November 19, 2010 07:50 EST, walexey wale...@gmail.com wrote: Hello everybody! How can i create with puppet following sudoers file: User_Alias CENTREON=apache,nagios CENTREON ALL = NOPASSWD: /etc/init.d/nagios* restart CENTREON ALL = NOPASSWD: /etc/init.d/nagios*

Re: [Puppet Users] Augeas type to edit/append to /etc/pam.d/sshd

2010-10-05 Thread Tim Sharpe
Hi Luke, I do something similar for a different module, give the following a try: augeas { mod_mkhomedir_for_pam_sshd: context = /files/etc/pam.d/sshd, changes = [ins 100 before *, set 100/type session, set 100/control required,

[Puppet Users] Augeas type to edit/append to /etc/pam.d/sshd

2010-10-04 Thread luke.bigum
Hi all, I'm trying to do something that should be pretty simple but can't figure it out. I want to append a line to /etc/pam.d/sshd if a line with a certain module doesn't exist. What I would like to work is this: augeas { sshd_pam_mkhomedir: context = /files/etc/pam.d/sshd, changes

Re: [Puppet Users] Augeas type to edit/append to /etc/pam.d/sshd

2010-10-04 Thread Patrick
On Oct 4, 2010, at 9:00 AM, luke.bigum wrote: Hi all, I'm trying to do something that should be pretty simple but can't figure it out. I want to append a line to /etc/pam.d/sshd if a line with a certain module doesn't exist. What I would like to work is this: augeas {

Re: [Puppet Users] Augeas type to edit/append to /etc/pam.d/sshd

2010-10-04 Thread Rob McBroom
On Oct 4, 2010, at 12:00 PM, luke.bigum wrote: changes = [ set *[module = 'pam_mkhomedir.so']/type session, set *[module = 'pam_mkhomedir.so']/control required, set *[module = 'pam_mkhomedir.so']/module pam_mkhomedir.so, set *[module = 'pam_mkhomedir.so']/argument[1]

Re: [Puppet Users] augeas and /etc/securetty

2010-09-08 Thread Rob McBroom
On Sep 6, 2010, at 3:41 AM, hai wu wrote: Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1. Do not add it if ttyS1 already exists in file /etc/securetty. How to achieve this using puppet module in puppet 2.5? This file is different than the other examples using

Re: [Puppet Users] augeas and /etc/securetty

2010-09-08 Thread hai wu
This one is different from examples on that page, in that file /etc/securetty is not name value pair, it just has values in it. I used the following as the workaround: augeas { securetty: context = /files/etc/securetty, changes = [

Re: [Puppet Users] augeas and /etc/securetty

2010-09-08 Thread Nan Liu
On Wed, Sep 8, 2010 at 7:39 AM, hai wu haiwu...@gmail.com wrote: This one is different from examples on that page, in that file /etc/securetty is not name value pair, it just has values in it. I used the following as the workaround: augeas { securetty:

Re: [Puppet Users] augeas and /etc/securetty

2010-09-08 Thread Rob McBroom
On Sep 8, 2010, at 10:39 AM, hai wu wrote: This one is different from examples on that page, in that file /etc/securetty is not name value pair, it just has values in it I don't know what you mean. Most of the discussion on that page (and certainly the stuff in the numbered items section I

[Puppet Users] augeas and /etc/securetty

2010-09-06 Thread hai wu
Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1. Do not add it if ttyS1 already exists in file /etc/securetty. How to achieve this using puppet module in puppet 2.5? This file is different than the other examples using augeas, this one only has value per line, not name-val

Re: [Puppet Users] augeas and /etc/securetty

2010-09-06 Thread Daniel Pittman
hai wu haiwu...@gmail.com writes: Hi, I need to add one line to /etc/securetty, say it needs to be ttyS1. Do not add it if ttyS1 already exists in file /etc/securetty. I strongly suggest you copy into place a file that contains exactly the content you want: editing files in place is an

Re: [Puppet Users] augeas and /etc/securetty

2010-09-06 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 How to achieve this using puppet module in puppet 2.5? This file is different than the other examples using augeas, this one only has value per line, not name-val pair. you can find and example here:

[Puppet Users] Augeas Documentation

2010-08-23 Thread Rob McBroom
I've added a ton here, but preserved the original information. Anyone using Augeas should take a look. (I think there's a tendency to do things the hard way because the easy way was previously unknown/undocumented.) http://projects.puppetlabs.com/projects/puppet/wiki/Puppet_Augeas The main

[Puppet Users] Augeas working inconsistently

2010-07-27 Thread Rob McBroom
I’ve got this define. define sudoentry ($user, $host = ALL, $command = ALL, $tag = false, $runas = ALL) { $sudo_changes = $tag ? { false = [ set spec[user = '$user']/user $user, set spec[user = '$user']/host_group/host $host, set spec[user =

[Puppet Users] Augeas and grub.conf

2010-07-14 Thread Erinn Looney-Triggs
I hope that the answer to this isn't posted up somewhere else, I have looked around and I haven't found much of anything, augeas documentation seems to be thin. Is there even full documentation for all the augeas function and language syntax? What I am trying to do is edit the grub.conf file and

[Puppet Users] augeas and sudo woes

2010-06-30 Thread Jeff
The following function is based on code I found here in an earlier thread. define sudoer() { augeas { sudo${name}: context = /files/etc/sudoers, changes = [ set spec[last() + 1]/user ${name}, set spec[last()]/host_group/host ALL, set spec[last()]/host_group/command NOPASSWD:

Re: [Puppet Users] augeas and sudo woes

2010-06-30 Thread Rob McBroom
On Jun 30, 2010, at 9:12 AM, Jeff wrote: In that example, the command line looked like this: set spec[last()]/host_group/command ALL, I added NOPASSWD: and it barfs with this message: err: //user::unixadmins/User::Virtual::Sudoer[joe]/Augeas[sudojoe]/ returns: change from need_to_run

Re: [Puppet Users] augeas and sudo woes

2010-06-30 Thread Rob McBroom
On Jun 30, 2010, at 10:36 AM, Rob McBroom wrote: In any case, I would try this: set spec[last()]/host_group/command 'NOPASSWD: ALL’”, And of course replace the fancy quotes my mail client inserted. -- Rob McBroom http://www.skurfer.com/ -- You received this message because you are

Re: [Puppet Users] Augeas and double quotes

2010-06-22 Thread Guus Houtzager
On Mon, Jun 21, 2010 at 11:40 PM, Patrick Mohr kc7...@gmail.com wrote: First, quotes probably aren't needed unless the value has a space in it. Second, single quotes should work fine. Anyway, here's an example that will work for something that has a space in it, and needs to be quoted:

[Puppet Users] Augeas and double quotes

2010-06-21 Thread Guus Houtzager
Hi, I've got a bit of an issue with Augeas in Puppet. I'm trying to modify /etc/sysconfig/i18n (RHEL4 system). Original file: LANG=en_US.UTF-8 SUPPORTED=en_US.UTF-8:en_US:en SYSFONT=latarcyrheb-sun16 This is the code to change it: $filename = $operatingsystem ? { redhat =

Re: [Puppet Users] Augeas and double quotes

2010-06-21 Thread Patrick Mohr
On Jun 21, 2010, at 7:05 AM, Guus Houtzager wrote: Hi, I've got a bit of an issue with Augeas in Puppet. I'm trying to modify /etc/sysconfig/i18n (RHEL4 system). Original file: LANG=en_US.UTF-8 SUPPORTED=en_US.UTF-8:en_US:en SYSFONT=latarcyrheb-sun16 This is the code to change it:

Re: [Puppet Users] Augeas problem changing values in postfix/main.cf

2010-06-18 Thread Patrick Mohr
On Jun 17, 2010, at 11:04 AM, John Martin wrote: I have done some further experimenting and found things even more perplexing. The rule is now just adding the new values that I need. The rule is: augeas { dkim-postfix-settings: require = Package[postfix],

Re: [Puppet Users] Augeas problem changing values in postfix/main.cf

2010-06-18 Thread John Martin
Thanks Patrick! I like the separation of the values being set and adding the comments. That makes complete sense. As for the over-writing of the values, you were absolutely right. The main.cf was being managed by a different class that another Ops engineer had implemented and I was unaware of.

Re: [Puppet Users] augeas and sendmail aliases

2010-06-17 Thread Rob McBroom
On Jun 16, 2010, at 5:42 PM, Silviu Paragina wrote: set /files/etc/aliases/*[name = ‘ftp’]/name ftp I've actually tried this in augtool and puppet and it didn't work. In puppet it fails silently and on first sight you would believe everything went ok. In augtool it simply fails. So it

Re: [Puppet Users] augeas and sendmail aliases

2010-06-17 Thread Christopher Johnston
I was never able to get this working properly for /etc/services, there is support in augeas now to do the matches properly but I think the ruby bindings are not up to date with the new changes which ended up making puppet fail. On Thu, Jun 17, 2010 at 9:06 AM, Rob McBroom

[Puppet Users] Augeas problem changing values in postfix/main.cf

2010-06-17 Thread PBWebGuy
I have been working with the Augeas resource command and having a difficult time. At this point I am perplexed as to why the following code doesn't work. I have the following rule for updating the main.cf file to change an existing value and to add a new element with comments: augeas {

Re: [Puppet Users] Augeas problem changing values in postfix/main.cf

2010-06-17 Thread John Martin
I have done some further experimenting and found things even more perplexing. The rule is now just adding the new values that I need. The rule is: augeas { dkim-postfix-settings: require = Package[postfix], context = /files/etc/postfix/main.cf,

[Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Sukh Khehra
I am trying to add an entry to /etc/aliases using this but am unable to keep the entry from being added on every puppet run. I couldn't figure out the proper onlyif attribute to use to add it only once. augeas{ add sendmail alias : context = /files/etc/aliases, changes = [

Re: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread Silviu Paragina
Search in the list history for a thread named augeas type and /etc/services Silviu On 16.06.2010 20:38, Sukh Khehra wrote: I am trying to add an entry to /etc/aliases using this but am unable to keep the entry from being added on every puppet run. I couldn't figure out the proper onlyif

Re: [Puppet Users] augeas and sendmail aliases

2010-06-16 Thread R.I.Pienaar
On 16.06.2010 20:38, Sukh Khehra wrote: I am trying to add an entry to /etc/aliases using this but am unable to keep the entry from being added on every puppet run. I couldn't figure Is there something wrong with the puppet native type to manage this file? out the proper onlyif

<    1   2   3   >