diff --git a/README.md b/README.md index 374064a..3249b30 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/defaults/main.yml b/defaults/main.yml index 6e631c2..a31563b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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" diff --git a/templates/drone-server.env.j2 b/templates/drone-server.env.j2 index bcc6b2b..fb90a08 100644 --- a/templates/drone-server.env.j2 +++ b/templates/drone-server.env.j2 @@ -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 %}