feat(database): verify that required database parameters

This commit is contained in:
Bo-Yi Wu 2019-06-16 14:29:21 +08:00
parent c493431915
commit 5857b03e42
2 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,6 @@ drone_postgres_data_dir: "/var/lib/postgresql/data"
drone_postgres_password: "drone" drone_postgres_password: "drone"
drone_postgres_user: "drone" drone_postgres_user: "drone"
drone_postgres_db: "drone" drone_postgres_db: "drone"
drone_database_datasource: ""
drone_mysql_data_dir: "/var/lib/mysql/data" drone_mysql_data_dir: "/var/lib/mysql/data"
drone_mysql_password: "drone" drone_mysql_password: "drone"
drone_mysql_user: "drone" drone_mysql_user: "drone"

View File

@ -1,4 +1,13 @@
--- ---
- name: verify that required database parameters
fail:
msg: "Variable '{{ item }}' is not defined for drone server setup"
when: item not in vars and drone_database_driver != "sqlite"
with_items:
- drone_database_datasource
tags:
- configuration
- name: copy config for drone server - name: copy config for drone server
template: template:
src: "drone-server.env.j2" src: "drone-server.env.j2"