43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
|
---
|
||
|
- hosts: all
|
||
|
gather_facts: false
|
||
|
tasks:
|
||
|
- name: Load variables
|
||
|
include_vars:
|
||
|
dir: "{{ dokku_lib_root }}/data/ansible/homebase/vars/"
|
||
|
extensions:
|
||
|
- yml
|
||
|
|
||
|
- name: Set HTTP 80 port proxy
|
||
|
dokku_ports:
|
||
|
app: homebase
|
||
|
mappings:
|
||
|
- "http:80:{{ http_port }}"
|
||
|
- "http:{{ dat_port }}:{{ dat_port }}"
|
||
|
state: present
|
||
|
|
||
|
- name: Setup LE certificates
|
||
|
shell: dokku letsencrypt homebase
|
||
|
args:
|
||
|
creates: /home/dokku/homebase/letsencrypt/certs
|
||
|
|
||
|
- name: Setup LE certificates renew cron job
|
||
|
shell: dokku letsencrypt:cron-job --add
|
||
|
args:
|
||
|
creates: /home/dokku/homebase/letsencrypt/cron-job
|
||
|
|
||
|
- name: Remove automatically configured ports
|
||
|
dokku_ports:
|
||
|
app: homebase
|
||
|
mappings:
|
||
|
- "http:{{ dat_port }}:{{ dat_port }}"
|
||
|
- "http:{{ http_port }}:{{ http_port }}"
|
||
|
state: absent
|
||
|
|
||
|
- name: Set HTTP 443 port
|
||
|
dokku_ports:
|
||
|
app: homebase
|
||
|
mappings:
|
||
|
- "https:443:{{ http_port }}"
|
||
|
state: present
|