[augeas-devel] augeas for hosts.allow

Raphaël Pinson raphael.pinson at camptocamp.com
Thu May 30 10:08:29 UTC 2013


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/47325ce0/attachment.htm>


More information about the augeas-devel mailing list