feat: add gitlab and gitea config

This commit is contained in:
Bo-Yi Wu 2019-06-16 21:27:47 +08:00
parent b9c0d13361
commit ea4f097ef2
3 changed files with 31 additions and 1 deletions

View File

@ -54,7 +54,7 @@ The ansible role offers additional parameters - please check `defaults/main.yml`
import the drone role from
```
$ ansible-galaxy install -f appleboy.drone
$ ansible-galaxy install appleboy.drone
```
Add the following in playbook.

View File

@ -13,6 +13,15 @@ drone_github_server: "https://github.com"
drone_github_client_id: ""
drone_github_client_secret: ""
drone_gitlab_server: "https://gitlab.com"
drone_gitlab_client_id: ""
drone_gitlab_client_secret: ""
drone_gitea_server: ""
drone_gitea_client_id: ""
drone_gitea_client_secret: ""
drone_gitea_skip_verify: "false"
drone_database_driver: "sqlite"
drone_sqlite_dir: "/var/lib/drone"
drone_postgres_data_dir: "/var/lib/postgresql/data"

View File

@ -29,3 +29,24 @@ DRONE_DATABASE_DRIVER={{ drone_database_driver }}
{% if drone_database_datasource is defined and drone_database_driver != "sqlite" %}
DRONE_DATABASE_DATASOURCE={{ drone_database_datasource }}
{% endif %}
DRONE_GITLAB_SERVER=https://gitlab.com
{% if drone_gitlab_client_id is defined %}
DRONE_GITLAB_CLIENT_ID={{ drone_gitlab_client_id }}
{% endif %}
{% if drone_gitlab_client_secret is defined %}
DRONE_GITLAB_CLIENT_SECRET={{ drone_gitlab_client_secret }}
{% endif %}
{% if drone_gitea_server is defined %}
DRONE_GITEA_SERVER={{ drone_gitea_server }}
{% endif %}
{% if drone_gitea_client_id is defined %}
DRONE_GITEA_CLIENT_ID={{ drone_gitea_client_id }}
{% endif %}
{% if drone_gitea_client_secret is defined %}
DRONE_GITEA_CLIENT_SECRET={{ drone_gitea_client_secret }}
{% endif %}
{% if drone_gitea_skip_verify is defined %}
DRONE_GITEA_SKIP_VERIFY={{ drone_gitea_skip_verify }}
{% endif %}