On 03-03-11 15:09, [email protected] wrote:
> Forum: Cfengine Help
> Subject: Re: Cfengine Help: Re: Cfengine Help: ex_list and purge conflict?
> Author: hartikka
> Link to topic: https://cfengine.com/forum/read.php?3,20882,20897#msg-20897
>
> All,
>
> Thank you again Bas.
>
> Do I have to create a 'purge directory'? I cannot find mention in the ref
> doc.
>
> I find in the ref document...
> body copy_from mycopy(from,server)
>
> {
> source => "$(from)";
> servers => { "$(server)" };
> copy_backup => "true";
>
> special_class::
>
> purge => "true";
> }
>
Here is a real life example. For each "purge" directory you must create a
directory on the policy server:
{{{
bundle agent daily {
methods:
any::
"any" usebundle => mirror_copy("$(g.policyserver)", "/usr/sara");
}
bundle agent mirror_copy(server, source_dir)
{
vars:
any::
"bundle_dir" string => "/data/cfengine3/data/bundles/mirror_copy";
"exclude_list" slist => { ".svn" };
files:
any::
"$(source_dir)"
comment => "Make sure that directries will be mirrored",
copy_from => sync_cp("$(bundle_dir)/$(source_dir)", "$(server)"),
depth_search => recurse_ignore("inf", "@(exclude_list)" ),
action => if_elapsed(0);
}
body link_from force_symlink
{
when_no_source => "force";
}
}}}
sync_cp and recurse_ignore are defined in the standard cfengine library.
The placeholder files are created in the policy server host.
>
> Speaking of the language...
> What does CFengine think I mean by giving an 'ex_list' if it is just going to
> 'purge' those files anyway?
> Nothing?
> If so, it seems like the language is missing an opportunity to express a
> reasonable state of affairs.
>
Is is cfengine. Some things are simple or a little complicated ;-). fill in
a request at:
* https://cfengine.com/bugtracker/my_view_page.php
Good luck
--
********************************************************************
* Bas van der Vlies e-mail: [email protected] *
* SARA - Academic Computing Services Amsterdam, The Netherlands *
********************************************************************
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine