Hi Daniel,

thank you for pointing out some of these deficiencies.

Daniel Holth wrote:
> Hi! I used cfengine successfully a decade ago. Now I'm trying to use it
> again.
> 
> I'm trying to get started with cfengine3 using the example config files.
> I noticed a few elements from cfengine_stdlib.cf
> <http://cfengine_stdlib.cf> are redefined in site.cf <http://site.cf>,
> update.cf <http://update.cf>, and library.cf <http://library.cf>. I was
> surprised that the example configuration files don't work with the
> standard library.
> 
> 
> The stdlib's body action immediate { ifelapsed => "0"; }  but update.cf
> <http://update.cf>'s version has { ifelapsed => "1"; }. Is there any
> harm in using "0" instead of "1"? Should one of them be renamed to
> almost_immediate?
> 
> 
> In the documentation, process_select is sometimes documented as
> select_process. Are both valid?
> 
> 
> In the documentation, "left hand side" is misspelled "left hand size".
> 
> 
> When using process_select, is it possible to pass the regex process
> selector (the leftmost string) to the process_select body? I wanted to
> match named processes only if they were owned by a particular owner. I
> wound up with:
> 
> processes:
>     ".*" process_select => process_owner("foobar .*", "root");
> 
> ...
> 
> body process_select process_owner(command, owner) {
>     command => "$(command)";
>     process_owner => { "$(owner)" };
>     process_result => "!(command.process_owner)";
> }
> 
> but I wanted something like:
> 
> processes:
>     "foobar .*" process_select => process_owner("$(lhs)", "root");
> 

I think what you want here is to pass a list? i.e. pass @(bundle.lhs)
not $(lhs), because the latter would iterate the whole promise over the list
leading to mulitple searches.


-- 
Mark Burgess

-------------------------------------------------
Professor of Network and System Administration
Oslo University College, Norway

Personal Web: http://www.iu.hio.no/~mark
Office Telf : +47 22453272
-------------------------------------------------
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to