[augeas-devel] augeas for hosts.allow

mohammad kashif kashif.alig at gmail.com
Thu May 30 10:46:55 UTC 2013


Hi Raphael
Thanks a lot for your quick response. It worked like a charm.
Cheers
Kashif


On Thu, May 30, 2013 at 11:08 AM, Raphaël Pinson <
raphael.pinson at camptocamp.com> wrote:

> Hello Mohammad,
>
> In order to add entries to hosts.allow, you can use "01" as a number, like:
>
> set /files/etc/hosts.allow/01/process[last()+1] xyz
>
> If you use this in Puppet, you will have to add an "onlyif" statement to
> make sure the change is idempotent.
>
>
> Raphaël
>
>
>
> On Thu, May 30, 2013 at 11:37 AM, mohammad kashif <kashif.alig at gmail.com>wrote:
>
>>
>> Hi
>>
>> I want to add a new process in hosts.allow file through augeas. I can do
>> like this
>>
>> set /files/etc/hosts.allow/2/process[last()+1] nrpe
>>
>> but here I have to explicitly mention line number (2 )
>>
>> so for next process I have to do
>>
>> set /files/etc/hosts.allow/3/process[last()+1] xyz
>>
>> Is there any way so I don't have to explicitly define this number. I want
>> to use through puppet define.
>>
>>
>> Thanks
>> Kashif
>>
>> _______________________________________________
>> augeas-devel mailing list
>> augeas-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/augeas-devel
>>
>
>
>
> --
> Raphaël Pinson
> Développeur et Formateur Infrastructure
> +33 479 926 57 93
>
> Camptocamp France
> Savoie Technolac
> BP 352
> 48, avenue du Lac du Bourget
> 73372 Le Bourget du Lac, Cedex
> www.camptocamp.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20130530/caa9de74/attachment.htm>


More information about the augeas-devel mailing list