Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Infrastructure
Public
ansible
taiga-ansible
Commits
e4cd6336
Commit
e4cd6336
authored
Jul 22, 2019
by
Florian Haas
Browse files
Use bool filters where appropriate
parent
ef3568fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
roles/taiga-webserver/templates/taiga.conf.j2
View file @
e4cd6336
...
...
@@ -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;
...
...
roles/taiga/tasks/main.yml
View file @
e4cd6336
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment