Browse Source

Disabled automatic sorting of mapping keys in jinja templating

tags/v0.55.0
francesco.a 7 years ago
parent
commit
630a522ba4
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      nginx/ng/config.sls
  2. +1
    -1
      nginx/ng/map.jinja
  3. +1
    -1
      nginx/ng/servers_config.sls

+ 1
- 1
nginx/ng/config.sls View File

- source: salt://nginx/ng/files/nginx.conf - source: salt://nginx/ng/files/nginx.conf
- template: jinja - template: jinja
- context: - context:
config: {{ nginx.server.config|json() }}
config: {{ nginx.server.config|json(sort_keys=False) }}

+ 1
- 1
nginx/ng/map.jinja View File

{% macro sls_block(dict) %} {% macro sls_block(dict) %}
{% for key, value in dict.items() %} {% for key, value in dict.items() %}
- {{ key }}: {{ value|json() }}
- {{ key }}: {{ value|json(sort_keys=False) }}
{% endfor %} {% endfor %}
{% endmacro %} {% endmacro %}



+ 1
- 1
nginx/ng/servers_config.sls View File

- source: salt://nginx/ng/files/server.conf - source: salt://nginx/ng/files/server.conf
- template: jinja - template: jinja
- context: - context:
config: {{ settings.config|json() }}
config: {{ settings.config|json(sort_keys=False) }}
{% if 'overwrite' in settings and settings.overwrite == False %} {% if 'overwrite' in settings and settings.overwrite == False %}
- unless: - unless:
- test -e {{ server_curpath(server) }} - test -e {{ server_curpath(server) }}

Loading…
Cancel
Save