Ver código fonte
Merge pull request #150 from europeconsulting/unsorted_context_mappings
Disabled automatic sorting of mapping keys in jinja templating
tags/v0.55.0
N
6 anos atrás
Nenhuma conta vinculada ao e-mail do autor do commit
3 arquivos alterados com
3 adições e
3 exclusões
-
nginx/ng/config.sls
-
nginx/ng/map.jinja
-
nginx/ng/servers_config.sls
|
|
@@ -25,5 +25,5 @@ nginx_config: |
|
|
|
- template: jinja |
|
|
|
{% if 'source_path' not in nginx.server.config %} |
|
|
|
- context: |
|
|
|
config: {{ nginx.server.config|json() }} |
|
|
|
config: {{ nginx.server.config|json(sort_keys=False) }} |
|
|
|
{% endif %} |
|
|
@@ -1,6 +1,6 @@ |
|
|
|
{% macro sls_block(dict) %} |
|
|
|
{% for key, value in dict.items() %} |
|
|
|
- {{ key }}: {{ value|json() }} |
|
|
|
- {{ key }}: {{ value|json(sort_keys=False) }} |
|
|
|
{% endfor %} |
|
|
|
{% endmacro %} |
|
|
|
|
|
|
@@ -116,7 +116,7 @@ nginx_server_available_dir: |
|
|
|
- service: nginx_service |
|
|
|
{% if 'source_path' not in settings.config %} |
|
|
|
- context: |
|
|
|
config: {{ settings.config|json() }} |
|
|
|
config: {{ settings.config|json(sort_keys=False) }} |
|
|
|
{% endif %} |
|
|
|
{% if 'overwrite' in settings and settings.overwrite == False %} |
|
|
|
- unless: |