Forum: CFEngine Help
Subject: Re: "expand_scalars" in "copy_from"?
Author: Beto
Link to topic: https://cfengine.com/forum/read.php?3,23643,23645#msg-23645
Here is an example to do what you want:
"/var/ossec/etc/ossec.conf"
edit_line =>
expand_template("$(glb.templates)/ossec.conf.template"),
edit_defaults => empty,
classes => if_repaired("restart_ossec"),
create => "true";
This doesn't copy ossec.conf.template from the server, however. To do that you
need to decide how you want to manage your template files. What we do is keep
all the templates in /var/cfengine_master/master_files/templates and copy them
to the client with a single promise:
"$(glb.templates)"
copy_from => force("/templates"),
depth_search => recurse("inf");
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine