63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
---
|
|
- hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Load variables
|
|
include_vars:
|
|
dir: "{{ dokku_lib_root }}/data/ansible/minio/vars/"
|
|
extensions:
|
|
- yml
|
|
|
|
- name: Set HTTP 80 port proxy
|
|
dokku_ports:
|
|
app: minio
|
|
mappings:
|
|
- "http:80:{{ http_port }}"
|
|
state: present
|
|
|
|
- name: Setup LE certificates
|
|
shell: dokku letsencrypt minio
|
|
args:
|
|
creates: /home/dokku/minio/letsencrypt/certs
|
|
|
|
- name: Setup LE certificates renew cron job
|
|
shell: dokku letsencrypt:cron-job --add
|
|
args:
|
|
creates: /home/dokku/minio/letsencrypt/cron-job
|
|
|
|
- name: Specify certificate docker volume mounts
|
|
dokku_storage:
|
|
app: minio
|
|
mounts:
|
|
- /home/dokku/minio/letsencrypt/certs:/root/.minio/certs
|
|
|
|
- name: Remove automatically configured ports
|
|
dokku_ports:
|
|
app: minio
|
|
mappings:
|
|
- "http:{{ http_port }}:{{ http_port }}"
|
|
state: absent
|
|
|
|
- name: Set HTTP 443 port
|
|
dokku_ports:
|
|
app: minio
|
|
mappings:
|
|
- "https:443:{{ http_port }}"
|
|
state: present
|
|
|
|
- name: Create Nginx customisation directory
|
|
file:
|
|
path: /home/dokku/minio/nginx.conf.d/
|
|
state: directory
|
|
owner: dokku
|
|
group: dokku
|
|
become: true
|
|
|
|
- name: Copy over the Nginx custom upload file
|
|
template:
|
|
src: upload.conf.j2
|
|
dest: /home/dokku/minio/nginx.conf.d/upload.conf
|
|
owner: dokku
|
|
group: dokku
|
|
become: true
|