Commit e4cd6336 authored by Florian Haas's avatar Florian Haas
Browse files

Use bool filters where appropriate

parent ef3568fe
......@@ -32,7 +32,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{% if _taiga_is_back_node %}
{% if _taiga_is_back_node | bool %}
proxy_pass http://127.0.0.1:{{ taiga_backend_port }}/api;
{% else %}
proxy_pass http://{{ taiga_backend_host }}:{{ taiga_backend_port }}/api;
......@@ -48,7 +48,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{% if _taiga_is_back_node %}
{% if _taiga_is_back_node | bool %}
proxy_pass http://127.0.0.1:{{ taiga_backend_port }}$request_uri;
{% else %}
proxy_pass http://{{ taiga_backend_host }}:{{ taiga_backend_port }}$request_uri;
......@@ -59,7 +59,7 @@ server {
# Static files
location /static {
{% if _taiga_is_back_node %}
{% if _taiga_is_back_node | bool %}
alias /home/taiga/taiga-back/static;
{% else %}
proxy_set_header Host $http_host;
......@@ -74,7 +74,7 @@ server {
# Media files
location /media {
{% if _taiga_is_back_node %}
{% if _taiga_is_back_node | bool %}
alias /home/taiga/taiga-back/media;
{% else %}
proxy_set_header Host $http_host;
......@@ -90,7 +90,7 @@ server {
{% if taiga_enable_events | bool %}
# Taiga-events
location /events {
{% if _taiga_is_events_node %}
{% if _taiga_is_events_node | bool %}
proxy_pass http://127.0.0.1:{{ taiga_events_port }}/events;
{% else %}
proxy_pass http://{{ taiga_events_host }}:{{ taiga_events_port }}/events;
......@@ -112,7 +112,7 @@ server {
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
{% if _taiga_is_back_node %}
{% if _taiga_is_back_node | bool %}
proxy_pass http://127.0.0.1:{{ taiga_backend_port }}$request_uri;
{% else %}
proxy_pass http://{{ taiga_backend_host }}:{{ taiga_backend_port }}$request_uri;
......
......@@ -36,9 +36,9 @@
- name: set facts identifying node roles
set_fact:
_taiga_is_back_node: "{{ 'taiga-back' in group_names }}"
_taiga_is_front_node: "{{ 'taiga-front' in group_names }}"
_taiga_is_events_node: "{{ 'taiga-events' in group_names }}"
_taiga_is_back_node: "{{ ('taiga-back' in group_names) | bool | default(false) }}"
_taiga_is_front_node: "{{ ('taiga-front' in group_names) | bool | default(false) }}"
_taiga_is_events_node: "{{ ('taiga-events' in group_names) | bool | default(false) }}"
tags:
- always
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment