/ansible-drone

Ansible role for drone deployment

MIT LicenseMIT

Ansible Drone

Stack

All Contributors Ansible Galaxy license PRs Welcome

Watch on GitHub Star on GitHub Follow Tweet

An ansible role for the drone CI deployment with Github/Bitbucket Cloud integration and PostgreSQL database.

Role Variables

Available variables:

Name Default Description
drone_version latest Version of Drone CI, see other versions here
drone_admins "" List of users with admin access to the drone, readme more
drone_agents [{name: "Nancy"}] Name of the docker agent container, you can add more than one agent
drone_host "" The url, where drone instance will be publicly available. Typically you would have nginx in front of Drone CI
drone_secret hTirsXmrY4YsyK79ELgB Drone secret key, used for private communication between agent and web UI more info
drone_integration github Integration type used by Drone CI. Available types: {github,bitbucket_cloud}
drone_github_client "" Github oauth application client identifier, more info
drone_github_secret "" Github oauth application client secret, more info
drone_bitbucket_key "" Bitbucket Cloud oauth application client key, more info
drone_bitbucket_secret "" Bitbucket Cloud oauth application client secret, more info
drone_postgress_password droneRocks23@p A password to postgress db used by drone
drone_postgress_user drone A username to postgress db used by drone, read more
drone_postgress_db drone A name of to postgress db used by drone, read more
drone_postgress_data_dir /drone-postgres-data A directory on a host machine, where postgresql data stored
nginx_drone_internal_host http://localhost:8000 Internal drone ui http url used by nginx to proxy traffic. For example: http://localhost:8000

Dependencies

Docker must be installed on the server in order to use this role. If you don't have docker on your server we recommend angstwad.docker_ubuntu Ansible role.

Example of using angstwad.docker_ubuntu:

---
- name: Setup drone ci server
  hosts: drone
  become: true
  roles:
    - { role: angstwad.docker_ubuntu }

Quick example

Example of the playbook file:

---
- name: Deploy drone CI server
  hosts: drone
  become_user: root
  become: true
  roles:
    - role: paralect.drone
      # Version of Drone CI, see other versions here: https://hub.docker.com/r/drone/drone/tags/
      drone_version: latest

      # the url, where drone instance will be publicly available
      # typically you would have nginx in front of Drone CI
      drone_host: http://178.62.116.103

      # Drone secret key, used for private communication between agent and web UI
      # more info: http://docs.drone.io/install-for-github/
      drone_secret: hTirsXmrY4YsyK79ELgB

      # Drone integration type
      drone_integration: bitbucket_cloud

      # Bitbucket Cloud oauth application client key and secret, more info http://docs.drone.io/install-for-bitbucket-cloud/
      drone_bitbucket_key:
      drone_bitbucket_secret:

      # A password to postgress db used by drone
      drone_postgress_password: droneRocks23@p
      # A username to postgress db used by drone, read more: http://docs.drone.io/database-settings/
      drone_postgress_user: drone
      # A name of to postgress db used by drone, read more: http://docs.drone.io/database-settings/
      drone_postgress_db: drone
      # a directory on a host machine, where postgresql data stored
      drone_postgress_data_dir: /drone-postgres-data

Change Log

This project adheres to Semantic Versioning. Every release is documented on the Github Releases page.

License

Ansible-drone is released under the MIT License.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Contributors

Thanks goes to these wonderful people (emoji key):


Andrew Orsich

📖 🤔 💻 📖 🤔 👀

Evgeny Zhivitsa

📖

This project follows the all-contributors specification. Contributions of any kind welcome!