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
when: droneci_postgres_user is defined
delegate_to: "{{ droneci_postgres_server }}"
when: droneci_postgres_enabled
when: droneci_postgres_enabled | bool

View File

@ -8,7 +8,7 @@ server {
listen 80;
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;
{% else %}
location / {
@ -22,7 +22,7 @@ server {
{% endif %}
}
{% if droneci_nginx_tls_enabled %}
{% if droneci_nginx_tls_enabled | bool %}
server {
listen 443 ssl;
server_name {{ droneci_server_name | urlsplit('hostname') }};

View File

@ -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 %}
{% if not droneci_postgres_enabled | bool %}
- 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 %}
{% if droneci_postgres_enabled | bool %}
- 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 %}
{% if droneci_gitea_enabled | bool %}
- 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 %}
{% if not droneci_postgres_enabled | bool %}
volumes:
droneserver-data:
{% endif %}