Forum: Cfengine Help Subject: Re: Seperating copy_from and permission promise Author: pieterb Link to topic: https://cfengine.com/forum/read.php?3,16834,16909#msg-16909
Thanks for the help so far Neil; here is the isolated piece of code: ######################################################### # isolated copy body common control { bundlesequence => {test}; } bundle agent test { files: "/var/test/test/" copy_from => cc("/var/cmasterfiles/files/test/", "10.30.30.92"), classes => if_else("repaired","notrepaired"), depth_search => recurse("inf"); reports: repaired:: "promised repaired"; notrepaired:: "promise kept"; } body classes if_else(yes,no) { promise_kept => { "$(no)" }; promise_repaired => { "$(yes)" }; repair_failed => { "$(no)" }; repair_denied => { "$(no)" }; repair_timeout => { "$(no)" }; } body copy_from cc(from,server) { source => "$(from)"; servers => { "$(server)" , "localhost" } ; compare => "digest"; # preserve => "false"; } body depth_search recurse(d) { depth => "$(d)"; } And this is the output, when I run it in Cfengine community 3.0.4p2 cf3 -> File permissions on /var/test/test/hello.txt as promised cf3 ?> defining promise result class notrepaired cf3 -> Updated file from 10.30.30.92:/var/cmasterfiles/files/test/hello.txt cf3 ?> defining promise result class repaired Am I missing something here? I did not ask for Cfengine to check the permissions, it does so anyway. Even with the operator 'preserve' = 'false', it goes on to say: cf3 -> Updated /var/test/test/hello.txt from source /var/cmasterfiles/files/test/hello.txt on 10.30.30.92 cf3 ?> defining promise result class repaired cf3 -> Copy of regular file succeeded /var/cmasterfiles/files/test/hello.txt to /var/test/test/hello.txt.cfnew cf3 -> Not attempting to preserve file permissions from the source cf3 -> File permissions on /var/test/test/hello.txt as promised Is it inferring that the file permissions are there as promised because I do not want to preserve them? Thanks for the help, Pieter _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine