47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
---
|
|
- hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Load variables
|
|
include_vars:
|
|
dir: "{{ dokku_lib_root }}/data/ansible/drone/vars/"
|
|
extensions:
|
|
- yml
|
|
|
|
- name: "Configure {{ drone_domain }} domain"
|
|
dokku_domains:
|
|
app: drone
|
|
domains:
|
|
- "{{ drone_domain }}"
|
|
state: present
|
|
|
|
- name: Create application directory
|
|
file:
|
|
path: /var/lib/drone
|
|
state: directory
|
|
owner: dokku
|
|
group: dokku
|
|
become: true
|
|
|
|
- name: Specify docker volume mounts
|
|
dokku_storage:
|
|
app: drone
|
|
mounts:
|
|
- /var/lib/drone:/data
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
- name: Configure the app environment
|
|
dokku_config:
|
|
app: drone
|
|
restart: false
|
|
config:
|
|
DOKKU_LETSENCRYPT_EMAIL: "{{ autonomic_admin_mail }}"
|
|
DRONE_GITEA_CLIENT_ID: "{{ gitea_client_id }}"
|
|
DRONE_GITEA_CLIENT_SECRET: "{{ gitea_client_secret }}"
|
|
DRONE_GITEA_SERVER: "{{ gitea_domain }}"
|
|
DRONE_GIT_ALWAYS_AUTH: "true"
|
|
DRONE_RPC_SECRET: "{{ rpc_secret }}"
|
|
DRONE_SERVER_HOST: "{{ drone_domain }}"
|
|
DRONE_SERVER_PROTO: "https"
|
|
DRONE_SERVER_PORT: ":{{ drone_port }}"
|