feat: update readme and meta

This commit is contained in:
Bo-Yi Wu 2019-06-16 18:54:50 +08:00
parent 03a07e8361
commit 2e635dd5bc
3 changed files with 86 additions and 76 deletions

View File

@ -9,31 +9,73 @@ This role will install drone [agents][1] + [server][2] using [docker](https://ww
This role requires: [docker installed](https://docs.docker.com/install/) on the server
Role Variables
--------------
### Role Variables
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Change the `drone_host_port` for expose port if conflict and update the `drone_version` from [github release page](https://github.com/drone/drone/releases).
Dependencies
------------
```yml
drone_version: "latest"
drone_host_port: "8080"
```
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Install the drone server or agent via the following config. Default is `false`.
Example Playbook
----------------
```yml
drone_server_enable: "false"
drone_agent_enable: "false"
```
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
Default database is `sqlite` and drone can be installed with `mysql` or `postgres` database. See the followings.
- hosts: servers
```yml
drone_database_driver: "postgres"
drone_postgres_data_dir: "/var/lib/postgresql/data"
drone_postgres_password: "drone"
drone_postgres_user: "drone"
drone_postgres_db: "drone
```
mysql database (5.7 version)
```yml
drone_database_driver: "mysql"
drone_mysql_data_dir: "/var/lib/mysql/data"
drone_mysql_password: "drone"
drone_mysql_user: "drone"
drone_mysql_db: "drone"
```
### additional parameters
The ansible role offers additional parameters - please check `defaults/main.yml` file.
## Example Playbook
- hosts: drone
vars_files:
- vars/main.yml
roles:
- { role: username.rolename, x: 42 }
- { role: appleboy.drone }
License
-------
Inside `vars/main.yml` for `drone-server`
BSD
```yml
drone_server_enable: "true"
drone_version: "latest"
drone_github_client_id: "e2bdde88b88f7ccf873a"
drone_github_client_secret: "b0412c975bbf2b6fcd9b3cf5f19c8165b1c14d0c"
drone_server_host: "368a7a66.ngrok.io"
drone_server_proto: "https"
drone_rpc_secret: "30075d074bfd9e74cfd0b84a5886b986"
drone_database_driver: "mysql"
drone_database_datasource: "drone:drone@tcp(mysql:3306)/drone?parseTime=true"
```
Author Information
------------------
for drone-agent:
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
```yml
drone_agent_enable: "true"
drone_version: "latest"
drone_rpc_server: "http://192.168.64.2:8081"
drone_rpc_secret: "30075d074bfd9e74cfd0b84a5886b986"
```

View File

@ -3,14 +3,16 @@ drone_agent_enable: "false"
drone_version: "latest"
drone_tls_autocert: "false"
drone_agents_enabled: "true"
drone_github_server: "https://github.com"
drone_github_client_id: ""
drone_github_client_secret: ""
drone_logs_pretty: "true"
drone_logs_color: "true"
drone_rpc_server: "http://drone-server"
drone_runner_capacity: "3"
drone_host_port: "8080"
drone_github_server: "https://github.com"
drone_github_client_id: ""
drone_github_client_secret: ""
drone_database_driver: "sqlite"
drone_sqlite_dir: "/var/lib/drone"
drone_postgres_data_dir: "/var/lib/postgresql/data"

View File

@ -1,60 +1,26 @@
galaxy_info:
author: your name
description: your description
company: your company (optional)
role_name: drone
author: Bo-Yi Wu <appleboy.tw@gmail.com>
description: Ansible role to configure drone (server and agent)
license: MIT
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
min_ansible_version: 2.3
# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)
platforms:
- name: Ubuntu
versions:
- bionic
- xenial
- name: Debian
versions:
- stretch
min_ansible_version: 2.4
galaxy_tags:
- drone
- docker
- ci
- drone-ci
- droneci
# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:
# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:
#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.
dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.
dependencies:
- { role: geerlingguy.docker }