---
- hosts: all
gather_facts: false
tasks:
- name: Load variables
include_vars:
dir: "{{ dokku_lib_root }}/data/ansible/drone/vars/"
extensions:
- yml
- name: Set HTTP 80 port proxy
dokku_ports:
app: drone
mappings:
- "http:80:{{ drone_port }}"
state: present
- name: Setup LE certificates
shell: dokku letsencrypt drone
args:
creates: /home/dokku/drone/letsencrypt/certs
- name: Setup LE certificates renew cron job
shell: dokku letsencrypt:cron-job --add
creates: /home/dokku/drone/letsencrypt/cron-job
- name: Specify certificate docker volume mounts
dokku_storage:
app: keycloak
mounts:
- /home/dokku/drone/letsencrypt/certs:/etc/ssl/certs/
- name: Set HTTP 443 port
- "https:443:{{ drone_port }}"
- name: Remove automatically configured ports
app: gitea
- "http:{{ drone_port }}:{{ drone_port }}"
state: absent