I'm at wits-end with trying to figure out an issue I have with Jinja inside
some Pillar configuration.
Here's the output error:
[CRITICAL] Rendering SLS 'base:accumulo' failed: Jinja variable No first
item, sequence was empty.
local:
- Rendering SLS 'base:accumulo' failed: Jinja variable No first item,
sequence was empty.
And here's the code that I believe is cause this error - at least it is the
only place that is using 'first()'.
{% if (salt['mine.get']('roles:accumulo_master', 'network.interfaces',
'grain').keys()|first() is none) %}
{%- set accumulo_master = salt['mine.get']('roles:accumulo_master',
'network.interfaces', 'grain').keys()|first() %}
{%- endif %}
{%- set accumulo_master = gc.get('accumulo_master',
pc.get('accumulo_master', 'localhost' )) %}
I've tried a handful of different ways to get this to work, none
successful. The 'first()' always seems to fail. The reason I'm trying to
handle the 'mine.get' is because I want to be able to support this formula
in a 'masterless' environment, where different nodes are all the same
machine. I'm stuck and am too naive about Salt to figure out what to do or
try next. Any help would be greatly appreciated.
TIA.
Kit
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.