Forum: CFEngine Help Subject: "expand_scalars" in "copy_from"? Author: davidlee Link to topic: https://cfengine.com/forum/read.php?3,23643,23643#msg-23643
(cfengine community 3.1.4; RHEL 5) Our cfengine config is happily importing a few configuration files for a few applications from a central server (which happens also to be the cfengine master) onto relevant client machines, using a "copy_from". Good. But one particular application wants one file to have one line that provides the hostname of the client machine onto which it is installed. The application itself defaults to using the FQDN; but we would much prefer it to use the simple, unqualified, hostname. This requires a line in the config file: nodename simple-hostname So... ...what we're after is the functionality of "copy_from" to import the basic file in template form from the server, combined with the functionality of "expand_scalars" so that our templated source file on the server could contain: nodename $(sys.uqhost) This sounds as though it should be very, very simple and straightforward. But I can't see a simple way to do this. What am I missing? _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine