Home Unable to reference Jinja 2 variable inside a function
 So i have a slight bit of an issue with jinja variable reference within a function. I've tried a handful of different methods to make this work, but none of them have yield any results. I hope some of you can help me out here! {% set device_type = salt['grains.get']('device','') %} {% set ip_addr = salt['network.ip_addrs'](' +device_type+ ')[0] %}  I'd like to have the variable device_type inside the salt function within ip_addr. I have tried the following already and none of it gave any results: {% set ip_addr = salt['network.ip_addrs'](\' +device_type+ \')[0] %} {% set ip_addr = salt['network.ip_addrs'](' ~ device_type ~ ')[0] %} {% set ip_addr = salt['network.ip_addrs']( {{ device_type }})[0] %} {% set ip_addr = salt['network.ip_addrs'](' {{ device_type }} ')[0] %}  Does anyone know how I could replace the device_type within that function?