Forum: CFEngine Help
Subject: Re: "expand_scalars" in "copy_from"?
Author: toddnni
Link to topic: https://cfengine.com/forum/read.php?3,23643,23675#msg-23675
davidlee,
you could also define the file in a string variable
files:
any::
"/path/to/file.conf"
perms => m("744"),
create => "true",
edit_defaults => empty,
edit_line => insert_lines(
"# a
# long
# configuration file
with $(variables)
");
where
body edit_defaults empty {
empty_file_before_editing => "true";
}
In my opinion this is simple and straightforward way. However in principle this
is same as the copy in two steps.
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine