feat(drone-server): verify that required server parameters

This commit is contained in:
Bo-Yi Wu 2019-06-16 17:11:25 +08:00
parent 5857b03e42
commit 2036b66837
3 changed files with 12 additions and 4 deletions

View File

@ -1,10 +1,7 @@
drone_server_enable: "false" drone_server_enable: "false"
drone_agent_enable: "false" drone_agent_enable: "false"
drone_version: "latest" drone_version: "latest"
drone_server_host: ""
drone_server_proto: "http"
drone_tls_autocert: "false" drone_tls_autocert: "false"
drone_rpc_secret: ""
drone_agents_enabled: "true" drone_agents_enabled: "true"
drone_github_server: "https://github.com" drone_github_server: "https://github.com"
drone_github_client_id: "" drone_github_client_id: ""

View File

@ -4,7 +4,7 @@
msg: "Variable '{{ item }}' is not defined for drone agent setup" msg: "Variable '{{ item }}' is not defined for drone agent setup"
when: item not in vars when: item not in vars
with_items: with_items:
- drone_server_host - drone_rpc_server
tags: tags:
- configuration - configuration

View File

@ -8,6 +8,17 @@
tags: tags:
- configuration - configuration
- name: verify that required server parameters
fail:
msg: "Variable '{{ item }}' is not defined for drone server setup"
when: item not in vars
with_items:
- drone_server_host
- drone_server_proto
- drone_rpc_secret
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"