In Salt ( using Jinja ), I can do something like this:
DNS2={{ salt['pillar.get']('nameservers')[1] }}
and on the minion, I can do this:
sudo salt-call pillar.get nameservers
and it will retrieve all of them ( plus a Local: heading)
Is there a way to directly access the values at a particular index?
something along the lines of this ( clearly not valid, but for demonstration)
sudo salt-call pillar.get nameservers[1]
something tells me there's either a salt-call flag I'm missing, or a special syntax to access it that I've not found.
I know that I can do something like this, it just seems... clunky and wrong:
sudo salt-call pillar.get nameservers --out=key | awk 'NR==3 {print}'
Lead me a better path if you know it.
Thanks
Matt