Forum: CFEngine Help Subject: Re: CFEngine Help: edit_template array variable expansion Author: jremond Link to topic: https://cfengine.com/forum/read.php?3,26062,26076#msg-26076
New test /tmp/template.example contains : [%CFEngine BEGIN %] # BEGIN $(dhcp.hosts) name[$(dhcp.hosts)] dhcp.name[$(dhcp.hosts)] (dhcp.name[$(dhcp.hosts)]) $(dhcp.name[$(dhcp.hosts)]) $(dhcp.name[ $(dhcp.hosts)]) $(dhcp.name[$(dhcp.hosts) ]) # END [%CFEngine END %] The result file post.expand contains : # BEGIN srv1 name dhcp.name (dhcp.name) $(dhcp#name[$(dhcp.hosts)]) $(dhcp.name[ srv1]) $(dhcp#name[$(dhcp.hosts) ]) # END # BEGIN srv2 name dhcp.name (dhcp.name) $(dhcp#name[$(dhcp.hosts)]) $(dhcp.name[ srv2]) $(dhcp#name[$(dhcp.hosts) ]) # END _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine