NoPaste

variable check

von McAldo

SNIPPET_TEXT:
  1. {%-     if salt['pillar.get']('bind:available_zones:' + zone + ':origin') %}
  2. {%-       for origin, origin_data in view_data.get('available_zones:' + zone + ':origin', {})|dictsort -%}
  3. {%-         set origin_records = salt['pillar.get']('bind:available_zones:' + zone + ':origin:' + origin + ':records', {}) %}
  4. {%-       endfor %}
  5. {%-     endif %}
  6.  
  7. {%- if salt['pillar.get']('bind:available_zones:' + zone + ':origin') %}
  8.     {%-   if origin_records != {} %}
  9.     - context:
  10.       origin: {{ origin }}
  11.       records: {{ origin_records | json }}
  12.       include: False
  13.     {%-   endif %}
  14. {%- endif %}
  15.  
  16. error-log output:
  17.  
  18.     Data failed to compile:
  19. ----------
  20.     Rendering SLS 'base:bind.config' failed: Jinja variable 'origin_records' is undefined

Quellcode

Hier kannst du den Code kopieren und ihn in deinen bevorzugten Editor einfügen. PASTEBIN_DOWNLOAD_SNIPPET_EXPLAIN