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:
image
docker image identifier. e.g.bradrydzewski/python:2.7
state
absent/present. Defaultpresent
drone_users
is a list of hashes, each hash containing the following:
remote
The remote system that the user exists in. e.g.github.com
login
The remote login username of the useradmin
True/False (boolean). DefaultFalse
active
True/False (boolean). DefaultTrue
state
present/absent. Defaultpresent
Valid values for the remote
configuration are
- github.com
- enterprise.github.com
- gitlab.com
- bitbucket.org
- gogs
drone_smtp_server
SMTP server addressdrone_smtp_port
SMTP server portdrone_smtp_address
EMail address to send fromdrone_smtp_username
SMTP authenticaiton usernamedrone_smtp_password
SMTP authentication password
drone_github_client
GitHub application client IDdrone_github_secret
GitHub application secretdrone_github_open
True/False (boolean). Whether open sign up is enabled. DefaultFalse
.drone_github_orgs
List of GitHub Organizations to restrict logins
drone_github_enteprise_client
GitHub application client IDdrone_github_enteprise_secret
GitHub application secretdrone_github_enteprise_url
GitHub domain. e.g.https://github.drone.io
drone_github_enteprise_api_url
GitHub Enterprise API URL. e.g.https://github.drone.io/api/v3/
drone_github_enteprise_private_mode
True/False (boolean) Whether your GitHub Enterprise installation is configured for Private Modedrone_github_enterprise_open
True/False (boolean). Whether open sign up is enabled. DefaultFalse
.drone_github_enterprise_orgs
List of GitHub Organizations to restrict logins
drone_bitbucket_client
Bitbucket application keydrone_bitbucket_secret
Bitbucket application secretdrone_bitbucket_open
True/False (boolean). Whether open sign up is enabled. DefaultFalse
.
drone_gitlab_url
GitLab URL. e.g.http://gitlab.drone.io
drone_gitlab_client
GitLab application client IDdrone_gitlab_secret
GitLab application secretdrone_gitlab_open
True/False (boolean). Whether open sign up is enabled. DefaultFalse
.drone_gitlab_skip_verify
True/False (boolean). Whether to skip SSL cert verification. DefaultFalse
drone_gogs_url
GOGS URL. e.g.http://gogs.drone.io
drone_gogs_secret
GOGS secretdrone_gogs_open
True/False (boolean). Whether open sign up is enabled. DefaultFalse
.
drone_port
Port for drone to listen ondrone_sslcert
Path to SSL certificatedrone_sslkey
Path to SSL keydrone_worker_cert
Path to SSL certificate for Docker worker connectiondrone_worker_key
Path to SSL key for DOcker worker connectiondrone_worker_nodes
List of Docker connection strings. Default- "unix:///var/run/docker.sock"
drone_database_driver
Database driver to use. Defaultsqlite3
. Options aresqlite3
, andmysql
drone_database_datasource
Database datasource connection string. Default/var/lib/drone/drone.sqlite
. Formysql
see 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_secret
String to use when signing session tokens, leave unconfigured to allow Drone to randomly assign a secret at startdrone_session_expires
Session 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