When running conf-mode scripts for multiple tagNodes the script is executed one time for every tagNode with changes applied.
Currently that results in the same configure scripte running twice or more times if there is changes on multiple tagNodes.
Because the tagNode value field is not propagated into the script it is not possible to detect what tagNode its running for, and then the script need to generate data for all instances of the tagNode.
This has the effect of calculating the data thing multiple times and possible reloading config daemons multiple times on each commit.
This is the case on wireguard,bacst_relay,cron, and other scripts thats executed by tagNodes.
In old time vyatta syntax you use $VAR(@) to get the tagNode value as a input. that stil works with the following syntax:
<tagNode name="example" owner="${vyos_conf_scripts_dir}/example.py $VAR(@)"> -- accessed by sys.argv[1] or <tagNode name="example" owner="VALUE='$VAR(@)' ${vyos_conf_scripts_dir}/example.py"> . -- accessed by os.environ["VALUE"]
in this example the value will be available on sys.argv[1], but it will only work on the old vyatta config engine.
Would it be possible to add this as a parameter by the vyatta-template-generator or as a env.variable thats shipped into all tagNode scripts?