Install drone, docker, required and optional docker images for drone operation.
- 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:
namename of the docker repo/imagetagrepo/image tag to pull. Defaultlatest
drone_users is a list of hashes, each hash containing the following:
namePersons nameemailPersons emailpasswordbcrypt password hash (optional, you will have to use forgot password to set a password)adminTrue/False (boolean). DefaultFalse.statepresent/absent. Defaultpresentupdate_passwordTrue/False (boolean). DefaultFalse. Setting as True will ensure the specified password.
- Install
bcryptpython module python -c "import bcrypt; print bcrypt.hashpw('<password>', bcrypt.gensalt());"
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_keyGitHub application keydrone_github_secretGitHub application secretdrone_github_domainGitHub domain. Defaultgithub.comdrone_github_apiurlGitHub API url. Defaulthttps://api.github.com
drone_bitbucket_keyBitbucket application keydrone_bitbucket_secretBitbucket application secret
drone_gitlab_domainGitLab domaindrone_gitlab_apiurlGitLab API url
drone_hostnameHostname that drone will be accessed on. Default hostname defined in inventory or "ansible_ssh_password"drone_portPort for drone to listen ondrone_schemehttp or https (https requiresdrone_sslcertanddrone_sslkeyand probablydrone_portconfigured for443)drone_sslcertPath to SSL certificatedrone_sslkeyPath to SSL key
drone_open_invitationsTrue/False (boolean). Whether open sign up is enabled. DefaultFalse.
Not all configuration options found in the database are used by drone at this time, or properly configurable by this role.
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:
- name: bradrydzewski/python
tag: 2.7
- name: bradrydzewski/go
tag: 1.2
- name: bradrydzewski/php
tag: 5.5
state: absent
drone_users:
- name: Jim Beam
email: jim@jimbeam.com
password: '$2a$12$elB.oZwqu2Ujp.Gi0.3cBOCOpqQ1K5xfNRzxS9AQrtf13.QfvZMO6'
admin: True
- name: Jack Daniel
email: jack@jackdaniels.com
password: '$2a$12$qSXdN7nCUGHSGaMI/8YyVeWdflr9fjY0/PL1ntr7mKrsVHsKRbMoO'
- name: Johnnie Walker
email: johnnie@johnniewalker.com
state: absent
drone_hostname: drone.example.com
drone_scheme: https
drone_port: 443
drone_sslcert: /etc/drone/ssl.crt
drone_sslkey: /etc/drone/ssl.key
drone_github_key: 3c6e0b8a9c15224a8228
drone_github_secret: 5ebe2294ecd0e0f08eab7690d2a6ee69ccc4a4d8
drone_smtp_server: localhost
drone_smtp_port: 25
drone_open_invitations: True
Apache License, Version 2.0