enot
enot copied to clipboard
Specify multiple configuration variables
trafficstars
Hello!
I can see in your example project, for the vm.args you have:
-name {{ app.name }}@127.0.0.1 -setcookie {{ app.name }}
Is there a way to specify other variables that we could use, such as {{ local_ip_addr }} ? Or is app.name the only variable? I assume the former, if you have any information please let me know!
hi,
you can access hostname and erl from the predefined variables.
Also you can use system's environmental variables:
F.e. export MAGIC_GREETING="hello" and use it in sys.config, vm.args, relx.config or .app.src
{env, [
{% if MAGIC_GREETING is defined %}
{greeting, "{{ MAGIC_GREETING }}"}
{% else %}
{greeting, "hello world!" }
{% endif %}
]}
```.
Please rever [here](https://github.com/comtihon/enot/blob/master/docs/templating.md)
Thanks! I didn't realize that you could add it to all of those files!