Re: How to get local ip address

2009-12-16 Thread flex
Thank you very much, it is useful! But there is no mention of this builtin variable in the "cf3-Reference.pdf", how could you find this? 2009/12/16 Mark Burgess > > Cfengine gives the address on the interface, like in the following from my > host. > There are too many possibilities to document i

Re: How to get local ip address

2009-12-16 Thread flex
t; different > interfaces make it tricky in this case. > > Erlend Leganger wrote: > > 2009/12/17 flex > >> Thank you very much, it is useful! > >> But there is no mention of this builtin variable in the > "cf3-Reference.pdf", how could you find

how to replace a couple of lines with another couple ?

2009-12-27 Thread flex
Hi, Everyone, I want to edit a config file, which needs to replace a couple of lines with another couple. It seems that the edit_line => replace_lines can only replace a couple of lines with one string. I try to pass a slist to it, such as that: bundle agent replace() { vars: "pattern

Re: how to replace a couple of lines with another couple ?

2009-12-29 Thread flex
I am very sorry, i paste the wrong code :( The right one is here: bundle agent replace() { vars: "patterns" slist => { "This", "is", "test"}; "lines" slist => { "111", "222" ,"333"}; files: "/test/test.txt" edit_line => replace_lines("@(replace.patterns)", "

Re: how to replace a couple of lines with another couple ?

2010-01-04 Thread flex
Is there anybody can help me ? 2009/12/30 flex > I am very sorry, i paste the wrong code :( > The right one is here: > > > bundle agent replace() > { > vars: > "patterns" slist => { "This", "is", "test&quo

Re: how to replace a couple of lines with another couple ?

2010-01-04 Thread flex
"$(patterns)" replace_with => with("$(replace.replacement[$(patterns)])"); } body replace_with with(str) { replace_value => "$(str)"; occurrences => "all"; } 2010/1/5 Daniel Dehennin > Le 5969 Septembre 1993, flex a

Re: max defaults

2010-01-30 Thread flex
This is very important. Sometime, i must test the default value or action by myself, otherwise i didn't know the result... 2010/1/29 Sergio Simone > yeah, > it would be great to have clearly stated defaults for everything in the > doc... > > cheers! > sergio > > On 28/gen/2010, at 15.41, nwat..