From 96fb7fb036506a992a08d7735dd495a75e3ce541 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 10 Jun 2019 14:09:49 +0200 Subject: [PATCH] fix ansible 2.8 bool vars --- templates/nginx/vhost.j2 | 4 ++-- templates/services/droneci-compose.yml.j2 | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/nginx/vhost.j2 b/templates/nginx/vhost.j2 index 0158cde..eb4d8b3 100644 --- a/templates/nginx/vhost.j2 +++ b/templates/nginx/vhost.j2 @@ -8,7 +8,7 @@ server { listen 80; server_name {{ droneci_server_name | urlsplit('hostname') }}; - {% if droneci_nginx_tls_enabled | bool %} + {% if droneci_nginx_tls_enabled %} return 301 https://$server_name$request_uri; {% else %} location / { @@ -22,7 +22,7 @@ server { {% endif %} } -{% if droneci_nginx_tls_enabled | bool %} +{% if droneci_nginx_tls_enabled %} server { listen 443 ssl; server_name {{ droneci_server_name | urlsplit('hostname') }}; diff --git a/templates/services/droneci-compose.yml.j2 b/templates/services/droneci-compose.yml.j2 index 1699555..719fa6a 100644 --- a/templates/services/droneci-compose.yml.j2 +++ b/templates/services/droneci-compose.yml.j2 @@ -9,7 +9,7 @@ services: ports: - {{ droneci_server_exposed_ip + ':' if droneci_server_exposed_ip is defined else '' }}{{ droneci_server_exposed_port }}:80 volumes: - {% if not droneci_postgres_enabled | bool %} + {% if not droneci_postgres_enabled %} - droneserver-data:/var/lib/drone/ {% endif %} {% if droneci_license_key is defined %} @@ -33,11 +33,11 @@ services: - DRONE_LOGS_COLOR=true - DRONE_LOGS_PRETTY=true - DRONE_TLS_AUTOCERT=false - {% if droneci_postgres_enabled | bool %} + {% if droneci_postgres_enabled %} - DRONE_DATABASE_DRIVER=postgres - DRONE_DATABASE_DATASOURCE=postgres://{{ droneci_postgres_user.name }}:{{ droneci_postgres_user.password }}@{{ droneci_postgres_server }}/{{ droneci_postgres_db.name }}?sslmode={{ droneci_postgres_ssl_mode }} {% endif %} - {% if droneci_gitea_enabled | bool %} + {% if droneci_gitea_enabled %} - DRONE_GITEA_SERVER={{ droneci_gitea_server }} - DRONE_GITEA_SKIP_VERIFY={{ droneci_gitea_skip_verify | lower }} {% if droneci_gitea_oauth_client_id is defined and droneci_gitea_oauth_client_secret is defined %} @@ -85,7 +85,7 @@ services: mem_reservation: {{ droneci_agent_memory_reservation }} {% endif %} -{% if not droneci_postgres_enabled | bool %} +{% if not droneci_postgres_enabled %} volumes: droneserver-data: {% endif %}