Changeset - 150ae0c46506
[Not reviewed]
0 4 0
Branko Majic (branko) - 4 years ago 2020-05-07 22:39:09
branko@majic.rs
MAR-149: Sort dictionaries in all templates in order to have predicatable order while iterating them (resolves idempotence issues in such cases).
4 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
roles/php_website/templates/fpm_site.conf.j2
Show inline comments
 
@@ -24,9 +24,9 @@ pm.max_spare_servers = 3
 
chdir = /
 

	
 
; Redirect worker stdout/stder into main error log. This will also allow Nginx
 
; to log errors in site-specific log file.
 
catch_workers_output = yes
 

	
 
{% for var, val in additional_fpm_config.items() %}
 
{% for var, val in additional_fpm_config | dictsort %}
 
{{ var }} = {{ val }}
 
{% endfor %}
roles/wsgi_website/templates/environment.sh.j2
Show inline comments
 
{% for var, val in environment_variables.items() %}
 
{% for var, val in environment_variables | dictsort %}
 
export {{ var }}='{{ val }}'
 
{% endfor %}
roles/wsgi_website/templates/nginx_site.j2
Show inline comments
 
@@ -56,13 +56,13 @@ server {
 
    location / {
 
        proxy_set_header X-Forwarded-Proto $scheme;
 
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 
        proxy_set_header Host $http_host;
 
        proxy_redirect off;
 

	
 
    {% for header, value in proxy_headers.items() -%}
 
    {% for header, value in proxy_headers | dictsort -%}
 
    proxy_set_header {{ header }} {{ value }};
 
    {% endfor -%}
 

	
 
        proxy_pass http://unix:/run/wsgi/{{ fqdn }}.sock;
 
    }
 

	
roles/wsgi_website/templates/systemd_wsgi_website.service.j2
Show inline comments
 
@@ -6,13 +6,13 @@ After=network.target
 
[Service]
 
User={{ user }}
 
Group={{ user }}
 
WorkingDirectory={{ home }}/code
 
ExecStart={{ home }}/virtualenv/bin/gunicorn --bind unix:/run/wsgi/{{ fqdn }}.sock {% if use_paste %}--paste {{home}}/code/{{ wsgi_application }}{% else %}{{ wsgi_application }}{% endif %}
 

	
 
{% for var, val in environment_variables.items() %}
 
{% for var, val in environment_variables | dictsort %}
 
Environment="{{ var }}={{ val }}"
 
{% endfor %}
 

	
 
ExecReload=/bin/kill -s HUP $MAINPID
 
ExecStop=/bin/kill -s TERM $MAINPID
 
PrivateTmp=true
0 comments (0 inline, 0 general)