Hi folks,
I took a set of examples (almost verbatim, but not quite) from Neil
Watson's excellent collection and have run into problems.
Here is the update.cf promise file I have:
----- 8< snip 8<------------------------------------
#######################
# update.cf
#######################
bundle agent update {
vars:
"masterfiles" string => "/var/cf-masterfiles";
"inputs" string => "${masterfiles}/master-files";
# for HA add more policy hosts
"phost" string => "10.1.1.254";
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)/bin/cf-failsafe.sh");
"/usr/local/etc/svn-checkout.sh"
perms => usystem("0700"),
copy_from =>
umycopy("$(masterfiles)/data-files/policy/usr/local/etc/svn-checkout.sh");
debian_5.64_bit::
"/var/cfengine/bin"
perms => usystem("0700"),
copy_from =>
umycopy("$(masterfiles)/config/branches/cf3/bin/debian-5-64"),
depth_search => urecurse("1");
}
body depth_search urecurse(d) {
depth => "${d}";n
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";
}
----- 8< snip 8<---------------------------------------------
When cf-execd runs I get complaints such that:
cf3:/var/cfengine/inputs/update.cf:57,16: syntax error, near token
'exclude_dirs'
Undeclared promise body "umycopy()" was referenced in a promise
Undeclared promise body "usystem()" was referenced in a promise
What's going on here?
--
Peter L. Berghold, Australian Cattle Dog Owner, Agility Fan, Foodie,
Salty Old Dog and Old School Unix Hacker.
Skype: cowdawg
"Those who fail to learn from history are condemned to repeat it"
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine