Skip to content

Instantly share code, notes, and snippets.

@jpic
Created January 5, 2018 18:21
Show Gist options
  • Save jpic/eb4b89f6a5ed5df4a5c1974a446350a5 to your computer and use it in GitHub Desktop.
Save jpic/eb4b89f6a5ed5df4a5c1974a446350a5 to your computer and use it in GitHub Desktop.
setup drone with ansible
---
- name: Create drone network
docker_network:
name: drone
- name: Drone server
docker_container:
name: drone-server
image: drone/drone:0.8.2
restart_policy: always
networks:
- name: drone
volumes:
- '{{ drone_data }}lib:/var/lib/drone'
env:
LETSENCRYPT_EMAIL: '{{ letsencrypt_email }}'
LETSENCRYPT_HOST: '{{ drone_dns }}'
VIRTUAL_HOST: '{{ drone_dns }}'
VIRTUAL_PORT: 8000
DRONE_HOST: '{{ drone_dns }}'
DRONE_GITEA: true
DRONE_GITEA_URL: 'https://{{ gitea_dns }}'
DRONE_SECRET: '{{ drone_secret }}'
DRONE_OPEN: false
DRONE_ADMIN: '{{ users[0]["name"] }}'
#GIN_MODE: release
- name: Drone agent
docker_container:
name: drone-agent
image: drone/drone:0.8.2
command: agent
networks:
- name: drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
env:
DRONE_HOST: '{{ drone_dns }}'
DRONE_SECRET: '{{ drone_secret }}'
DRONE_SERVER: ws://drone-server.drone/ws/broker
DRONE_GITEA: true
DRONE_GITEA_URL: 'https://{{ gitea_dns }}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment