script:/var/cfengine/update.cf
From Dgiref
####################### # update.cf ####################### bundle agent update { vars: "masterfiles" string => "/var/cf-masterfiles"; "inputs" string => "${masterfiles}/config/branches/cf3/inputs"; # for HA add more policy hosts "phost" string => "192.168.0.1"; files: # Fix directories "/var/cfengine/." create => "true", perms => usystem("0700"); "/var/cfengine/bin/." create => "true", perms => usystem("0700"); "/var/cfengine/ppkeys/." perms => usystem("0700"); # Copy inputs "/var/cfengine/inputs" perms => usystem("0600"), copy_from => umycopy("${inputs}"), depth_search => urecurse("inf"); # Copy binaries "/var/cfengine/bin/cf-failsafe.sh" perms => usystem("0700"), copy_from => umycopy("$(masterfiles)/config/branches/cf3/bin/cf-failsafe.sh"); } body depth_search urecurse(d) { depth => "${d}"; comment => "Exclude .svn revision control files from recursion." exclude_dirs => { "\.svn" }; } body perms usystem(p) { mode => "${p}"; owners => { "root" }; groups => { "root" }; } body copy_from umycopy(from) { source => "${from}"; servers => { "${phost}" }; compare => "digest"; verify => "true"; purge => "true"; }