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" :
                 context => "/files/etc/cron.allow",
#               changes => "set line[last()+1] $name",
                 changes => "set 1[last()+1] $name",
#               onlyif  => "match /files/etc/cron.allow/* include ALL",
                 onlyif  => "match *[.='$name'] not_include $name",
#               onlyif  => "get 1[.='ALL'] == ALL",
        }

The line ' changes => "set 1[last()+1] $name",' works like a charm but I am 
unable to get any onlyif to work.

If I use the onlyif in augtool I get this output, if this helps.

augtool> match /files/etc/cron.allow/*[.='ALL']
/files/etc/cron.allow/4 = ALL

Cheers
     Mark



________________________________
This email has been sent from Gala Coral Group Limited ("GCG") or a subsidiary 
or associated company. GCG is registered in England with company number 
07254686. Registered office address: 71 Queensway, London W2 4QH, United 
Kingdom; website: www.galacoral.com.

This e-mail message (and any attachments) is confidential and may contain 
privileged and/or proprietorial information protected by legal rules. It is for 
use by the intended addressee only. If you believe you are not the intended 
recipient or that the sender is not authorised to send you the email, please 
return it to the sender (and please copy it to [email protected]) and then 
delete it from your computer. You should not otherwise copy or disclose its 
contents to anyone.

Except where this email is sent in the usual course of business, the views 
expressed are those of the sender and not necessarily ours. We reserve the 
right to monitor all emails sent to and from our businesses, to protect the 
businesses and to ensure compliance with internal policies.

Emails are not secure and cannot be guaranteed to be error-free, as they can be 
intercepted, amended, lost or destroyed, and may contain viruses; anyone who 
communicates with us by email is taken to accept these risks. GCG accepts no 
liability for any loss or damage which may be caused by software viruses.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to