appleboy.drone

Ansible Role: Drone

This role installs Drone agents and server using Docker.

Build Status

Requirements

You need to have Docker installed on your server.

Role Variables

If there is a port conflict, change the drone_host_port and update the drone_version from the GitHub release page.

drone_version: "latest"
drone_host_port: "8080"

To install the Drone server or agent, set the following options. The default setting is false.

drone_server_enable: "false"
drone_agent_enable: "false"

By default, Drone uses sqlite for its database, but it can also be set up with mysql or postgres. Here are the configurations.

For PostgreSQL:

drone_database_driver: "postgres"
drone_postgres_data_dir: "/var/lib/postgresql/data"
drone_postgres_password: "drone"
drone_postgres_user: "drone"
drone_postgres_db: "drone"

For MySQL (version 5.7):

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 has more parameters. Check the defaults/main.yml file for details.

Example Playbook

To use the Drone role, first import it:

$ ansible-galaxy install appleboy.drone

Then, include it in your playbook:

- hosts: drone
  vars_files:
    - vars/main.yml
  roles:
    - { role: appleboy.drone }

In vars/main.yml for the Drone server:

drone_server_enable: "true"
drone_version: "latest"
drone_server_host: "368a7a66.ngrok.io"
drone_server_proto: "https"
drone_rpc_secret: "30075d074bfd9e74cfd0b84a5886b986"
drone_github_client_id: "e2bdde88b88f7ccf873a"
drone_github_client_secret: "b0412c975bbf2b6fcd9b3cf5f19c8165b1c14d0c"

In vars/main.yml for the Drone agent:

drone_agent_enable: "true"
drone_version: "latest"
drone_rpc_server: "http://192.168.64.2:8080"
drone_rpc_secret: "30075d074bfd9e74cfd0b84a5886b986"
Informazioni sul progetto

Ansible role to configure drone (server and agent)

Installa
ansible-galaxy install appleboy.drone
Licenza
mit
Download
305
Proprietario
I really believe committing every day to an open-source project is the best practice. Golang GDE (Google Developer Expert) in 2023