Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@silenius
Created January 11, 2017 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silenius/4a2b3bfa037bab6e287e848d0a92a9a0 to your computer and use it in GitHub Desktop.
Save silenius/4a2b3bfa037bab6e287e848d0a92a9a0 to your computer and use it in GitHub Desktop.
{% for k, v in storage.devices.items() %}
Device {
Name = "{{ k }}"
{% for pk, pv in v.items() %}
{%- if pv is string -%}
{{ pk }} = "{{ pv }}"
{% elif pv == True -%}
{{ pk }} = yes
{% elif pv == False -%}
{{ pk }} = no
{% else -%}
{{ pk }} = {{ pv }}
{%- endif %}
{%- endfor %}
}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment