1 #################################################
3 # upate.cf - Promises for updating policy files #
5 #################################################
11 "u_workdir" string => "/var/lib/cfengine3";
12 "u_policyhost" string => "cfengine.lan0";
16 "u_policy_servers" or => { classify("$(u_policyhost)") };
22 comment => "Set proper permissions of the work directory",
24 perms => u_workdir_perms("0600");
28 "$(u_workdir)/masterfiles/."
30 comment => "Set proper permissions of the $(u_workdir)/masterfiles directory",
32 perms => u_workdir_perms("0600"),
33 depth_search => u_recurse("inf");
35 "$(u_workdir)/inputs/."
37 comment => "Set permissions of input files on policy servers",
39 perms => u_workdir_perms("0600"),
40 depth_search => u_recurse("inf");
44 "$(u_workdir)/inputs/."
46 comment => "Update input files from policy server",
48 perms => u_workdir_perms("0600"),
49 depth_search => u_recurse("inf"),
50 copy_from => u_policy_copy("$(u_policyhost)");
57 body perms u_workdir_perms(mode) {
67 body copy_from u_policy_copy(server) {
68 source => "$(u_workdir)/inputs";
69 servers => { "$(u_policyhost)" };
72 copy_backup => "false";
79 body depth_search u_recurse(d) {