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 that:
> https://gist.github.com/18c50d8800840696bac0
> 
> But I can't get it to execute with augtool:
> 
> augtool> set /files/etc/hosts.allow/*[process=nrpe]/client[last()+1] 1.1.1.1
> error: Failed to execute command

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.

On 12/10/12 21:08, Trammael wrote:>
> I'm starting to think that with Augtool I have to explicitly create a
> node, while with Puppet augeas provider, I do not.  Hmm.

There's no difference like this.  The Puppet provider parses the
commands but feeds them into the same API as augtool itself uses.

Were you having problems just with augtool, or from Puppet too?

Cheers,

-- 
Dominic Cleal
Red Hat Consulting
m: +44 (0)7817 878113

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

Reply via email to