Am I missing something obvious here? It seems like if I try to do a
hierarchical copy and use digest it wont stop after copying the first file.
cf-agent -KIf ./test_single_copy_local.cf
-> Created file /tmp/test/test.1, mode = 600
-> Edited file /tmp/test/test.1
-> Created file /tmp/test/test, mode = 600
-> Edited file /tmp/test/test
-> Copying from localhost:/tmp/test/test.1
-> Updated /tmp/testfile from source /tmp/test/test on localhost
See the last two lines are a copy and update. And a subsequent run gives
-> Updated /tmp/testfile from source /tmp/test/test.1 on localhost
-> Updated /tmp/testfile from source /tmp/test/test on localhost
If I replace local_dcp with local_cp I get results that I expect.
-> Created file /tmp/test/test.1, mode = 600
-> Edited file /tmp/test/test.1
-> Created file /tmp/test/test, mode = 600
-> Edited file /tmp/test/test
-> Copying from localhost:/tmp/test/test.1
Here is the policy I was testing this with.
body common control {
bundlesequence => {
"init",
"main",
};
inputs => {
"cfengine_stdlib.cf",
};
}
bundle agent init{
files:
"/tmp/test/test.1"
edit_line => append_if_no_line("1"),
create => "true",
edit_defaults => empty,
comment => "Initalize source testfile 1";
"/tmp/test/test"
edit_line => append_if_no_line("default"),
create => "true",
edit_defaults => empty,
comment => "Initalize source default";
}
bundle agent main {
vars:
"suffixes" slist => { ".1", "" };
files:
"/tmp/testfile"
copy_from => local_dcp("/tmp/test/test$(suffixes)");
}
--
Nick Anderson <[email protected]>
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine