Install drone, docker, required and optional docker images for drone operation.
Version 1.x.x of this Ansible role is incompatibile with installations created by Version 0.x.x.
Additionally, the role configuration has changed and is incompatible with previous configurations.
The documentation in this document, is only for version 1.x.x.
- Ubuntu 12.04+
Drone does not currently offer an apt repository, to upgrade to a new verison supply --extra-vars upgrade_drone=true with your ansible-playbook run.
drone_images is a list of hashes, each hash containing the following:
imagedocker image identifier. e.g.bradrydzewski/python:2.7stateabsent/present. Defaultpresent
drone_users is a list of hashes, each hash containing the following:
remoteThe remote system that the user exists in. e.g.github.comloginThe remote login username of the useradminTrue/False (boolean). DefaultFalseactiveTrue/False (boolean). DefaultTruestatepresent/absent. Defaultpresent
Valid values for the remote configuration are
- github.com
- enterprise.github.com
- gitlab.com
- bitbucket.org
- gogs
drone_smtp_serverSMTP server addressdrone_smtp_portSMTP server portdrone_smtp_addressEMail address to send fromdrone_smtp_usernameSMTP authenticaiton usernamedrone_smtp_passwordSMTP authentication password
drone_github_clientGitHub application client IDdrone_github_secretGitHub application secretdrone_github_openTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.drone_github_orgsList of GitHub Organizations to restrict logins
drone_github_enteprise_clientGitHub application client IDdrone_github_enteprise_secretGitHub application secretdrone_github_enteprise_urlGitHub domain. e.g.https://github.drone.iodrone_github_enteprise_api_urlGitHub Enterprise API URL. e.g.https://github.drone.io/api/v3/drone_github_enteprise_private_modeTrue/False (boolean) Whether your GitHub Enterprise installation is configured for Private Modedrone_github_enterprise_openTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.drone_github_enterprise_orgsList of GitHub Organizations to restrict logins
drone_bitbucket_clientBitbucket application keydrone_bitbucket_secretBitbucket application secretdrone_bitbucket_openTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.
drone_gitlab_urlGitLab URL. e.g.http://gitlab.drone.iodrone_gitlab_clientGitLab application client IDdrone_gitlab_secretGitLab application secretdrone_gitlab_openTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.drone_gitlab_skip_verifyTrue/False (boolean). Whether to skip SSL cert verification. DefaultFalse
drone_gogs_urlGOGS URL. e.g.http://gogs.drone.iodrone_gogs_secretGOGS secretdrone_gogs_openTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.
drone_portPort for drone to listen ondrone_sslcertPath to SSL certificatedrone_sslkeyPath to SSL keydrone_worker_certPath to SSL certificate for Docker worker connectiondrone_worker_keyPath to SSL key for DOcker worker connectiondrone_worker_nodesList of Docker connection strings. Default- "unix:///var/run/docker.sock"
drone_database_driverDatabase driver to use. Defaultsqlite3. Options aresqlite3, andmysqldrone_database_datasourceDatabase datasource connection string. Default/var/lib/drone/drone.sqlite. Formysqlsee https://github.com/go-sql-driver/mysql#dsn-data-source-name
MySQL support is limited, in order for mysql to be configured, use of the mysql command must not require username or password specification. Additionally, the database must be named drone.
If using MySQL, mysql-server must already be installed and the database created before running this role.
drone_session_secretString to use when signing session tokens, leave unconfigured to allow Drone to randomly assign a secret at startdrone_session_expiresSession expiration time. Default72h. For time formating see http://golang.org/pkg/time/#ParseDuration
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
---
- hosts: drone
roles:
- role: sivel.drone
drone_images:
- image: bradrydzewski/python:2.7
- image: bradrydzewski/go:1.2
- image: bradrydzewski/php:5.5
state: absent
drone_users:
- remote: github.com
login: jim.beam
admin: True
- remote: github.com
login: jack.daniels
- remote: Johnnie Walker
login: johnnie.walker
state: absent
drone_port: 443
drone_sslcert: /etc/drone/ssl.crt
drone_sslkey: /etc/drone/ssl.key
drone_github_client: 3c6e0b8a9c15224a8228
drone_github_secret: 5ebe2294ecd0e0f08eab7690d2a6ee69ccc4a4d8
drone_smtp_server: localhost
drone_smtp_port: 25
drone_open_invitations: True
Apache License, Version 2.0