- Copy the contents of masterfiles into your masterfiles or equivalent repository.
- Include all EFL .cf files in your inputs list in the common control body. Example:
efl_lib.cf
bundle common efl_lib
{
#!/var/cfengine/bin/cf-agent -f | |
body common control { | |
bundlesequence => { "main" }; | |
} | |
bundle agent main{ | |
reports: | |
cfengine:: | |
"I can be executed like a shell script"; |
infra:~ # cf-agent -KI | |
!! Duplicate selection of value for variable "missing" in scope dead_hosts | |
!! Rule from /var/cfengine/inputs/actions/update.cf at/before line 38 | |
!! Duplicate selection of value for variable "missing" in scope dead_hosts | |
!! Rule from /var/cfengine/inputs/actions/update.cf at/before line 38 | |
------------------- | |
bundle agent dead_hosts { | |
vars: | |
"delay" int => "24"; |
bundle agent app_dhcpd | |
{ | |
classes: | |
"any" expression => regextract( | |
"([^\n]+)\.([^\n]+)\.([^\n]+)", | |
"$(sys.ipv4_3[eth0])", | |
"ip_addr" | |
); |
"=app-backup/rdiff-backup-1.2.8-r1" | |
package_policy => "add", | |
package_select => "==", | |
package_version => "1.2.8-r1", | |
package_method => generic; |
cat test | |
$(sys.fqhost) | |
bundle agent main | |
{ | |
files: | |
"/etc/test.tpl" | |
copy_from => secure_cp("$(g.configfiles)/etc/test", "$(g.host)"), | |
comment => "We must have a template that we can use to dynamically |