solutionDrive.drone
Ansible Role: drone
This role sets up drone agents and the server using docker-compose.
Requirements
To use this role, you need:
- Docker installed on the server.
Role Variables
Configuration Variables
drone_server_image: "drone/drone"
drone_agent_image: "drone/agent"
drone_version: "latest"
You can change the image repository and version used for deployment with these settings.
drone_start_server: true
drone_start_agent: true
These settings let you choose which parts of the drone setup to deploy (default is both the drone agent and server).
drone_agent_count: 1
This setting specifies how many drone agents to deploy (default is 1).
drone_debug: false
This setting decides if drone will run in debug mode (default is false).
drone_open: true
This setting determines if anyone can register with drone (default is true).
drone_agent_debug: false
This setting defines if the drone agent will run in debug mode (default is false).
Drone Specific Parameters
The role includes all the settings needed to configure drone via Ansible.
Server
Required
drone_secretdrone_admindrone_vcsdrone_server_url
Optional
drone_opendrone_database_driverdrone_database_configdrone_orgsdrone_debugdrone_server_certdrone_server_keydrone_yamldrone_cache_tty
Agent
Required
drone_secretdrone_server_host
Optional
drone_agent_server_urldrone_agent_https_proxydrone_agent_http_proxydrone_agent_docker_osdrone_agent_docker_archdrone_agent_docker_max_procsdrone_agent_docker_cert_pathdrone_agent_docker_tls_verifydrone_agent_docker_hostdrone_agent_plugin_privilegeddrone_agent_plugin_pulldrone_agent_max_logsdrone_agent_timeoutdrone_agent_backoffdrone_agent_debug
VCS
For GitHub
Required
drone_github_clientdrone_github_secret
Optional
drone_github_urldrone_github_scopedrone_github_usernamedrone_github_passworddrone_github_private_modedrone_github_merge_refdrone_github_contextdrone_github_skip_verify
For Bitbucket
Required
drone_bitbucket_clientdrone_bitbucket_secret
Additional Parameters
The Ansible role includes even more parameters - see defaults/main.yml for details.
Example Playbook
- hosts: drone
vars_files:
- vars/main.yml
roles:
- { role: solutiondrive.drone }
Inside vars/main.yml
drone_admin: "admin"
drone_secret: "thisisnotasecuresecret"
drone_server_host: "drone.domain.tld"
drone_vcs: "github"
drone_github_client: "github_client_token"
drone_github_secret: "github_client_secret"
drone_agent_count: 3
Maintainer
- Patrick Jahns jahns@solutiondrive.de
- Tobias Lückel lueckel@solutiondrive.de
Ansible role to configure drone (server and agent)
ansible-galaxy install solutionDrive.drone