version: 3.1.0 community
I am copying a directory from the server to the clients with copy_from. The
question is how can i copy a non-existence link?, eg: (directory tree)
* bas -> does_not_exists
* a
* b
* c
* a
* b
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);
}
I have tried create => "yes" and link_from:
body link_from force_symlink
{
when_no_source => "force";
}
But with link_from cfengine fails with a message:
{{{
!! Promise constraint conflicts - /usr/sara file cannot both be a copy of
and a link to the source
Promise (version 1.2.0) belongs to bundle 'mirror_copy' in file
'/var/lib/cfengine3/inputs/bundles/mirror_copy.cf' near line 17
Comment: Make sure that directries will be mirrored
}}}
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine