fix ansible 2.8 bool vars
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-06-10 13:58:52 +02:00
parent 0a8bddc0e0
commit 79bfad4644
3 changed files with 7 additions and 7 deletions

View File

@ -48,4 +48,4 @@
no_log: True no_log: True
when: droneci_postgres_user is defined when: droneci_postgres_user is defined
delegate_to: "{{ droneci_postgres_server }}" delegate_to: "{{ droneci_postgres_server }}"
when: droneci_postgres_enabled when: droneci_postgres_enabled | bool

View File

@ -8,7 +8,7 @@ server {
listen 80; listen 80;
server_name {{ droneci_server_name | urlsplit('hostname') }}; server_name {{ droneci_server_name | urlsplit('hostname') }};
{% if droneci_nginx_tls_enabled %} {% if droneci_nginx_tls_enabled | bool %}
return 301 https://$server_name$request_uri; return 301 https://$server_name$request_uri;
{% else %} {% else %}
location / { location / {
@ -22,7 +22,7 @@ server {
{% endif %} {% endif %}
} }
{% if droneci_nginx_tls_enabled %} {% if droneci_nginx_tls_enabled | bool %}
server { server {
listen 443 ssl; listen 443 ssl;
server_name {{ droneci_server_name | urlsplit('hostname') }}; server_name {{ droneci_server_name | urlsplit('hostname') }};

View File

@ -9,7 +9,7 @@ services:
ports: ports:
- {{ droneci_server_exposed_ip + ':' if droneci_server_exposed_ip is defined else '' }}{{ droneci_server_exposed_port }}:80 - {{ droneci_server_exposed_ip + ':' if droneci_server_exposed_ip is defined else '' }}{{ droneci_server_exposed_port }}:80
volumes: volumes:
{% if not droneci_postgres_enabled %} {% if not droneci_postgres_enabled | bool %}
- droneserver-data:/var/lib/drone/ - droneserver-data:/var/lib/drone/
{% endif %} {% endif %}
{% if droneci_license_key is defined %} {% if droneci_license_key is defined %}
@ -33,11 +33,11 @@ services:
- DRONE_LOGS_COLOR=true - DRONE_LOGS_COLOR=true
- DRONE_LOGS_PRETTY=true - DRONE_LOGS_PRETTY=true
- DRONE_TLS_AUTOCERT=false - DRONE_TLS_AUTOCERT=false
{% if droneci_postgres_enabled %} {% if droneci_postgres_enabled | bool %}
- DRONE_DATABASE_DRIVER=postgres - 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 }} - 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 %} {% endif %}
{% if droneci_gitea_enabled %} {% if droneci_gitea_enabled | bool %}
- DRONE_GITEA_SERVER={{ droneci_gitea_server }} - DRONE_GITEA_SERVER={{ droneci_gitea_server }}
- DRONE_GITEA_SKIP_VERIFY={{ droneci_gitea_skip_verify | lower }} - 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 %} {% 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 }} mem_reservation: {{ droneci_agent_memory_reservation }}
{% endif %} {% endif %}
{% if not droneci_postgres_enabled %} {% if not droneci_postgres_enabled | bool %}
volumes: volumes:
droneserver-data: droneserver-data:
{% endif %} {% endif %}