48 lines
1.3 KiB
YAML
48 lines
1.3 KiB
YAML
---
|
|
- hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Load variables
|
|
include_vars:
|
|
dir: "{{ dokku_lib_root }}/data/ansible/autonomic.zone/vars/"
|
|
extensions:
|
|
- yml
|
|
|
|
- name: Set HTTP 80 port proxy
|
|
dokku_ports:
|
|
app: autonomic.zone
|
|
mappings:
|
|
- "http:80:{{ http_port }}"
|
|
state: present
|
|
|
|
- name: Setup LE certificates
|
|
shell: dokku letsencrypt autonomic.zone
|
|
args:
|
|
creates: /home/dokku/autonomic.zone/letsencrypt/certs
|
|
|
|
- name: Setup LE certificates renew cron job
|
|
shell: dokku letsencrypt:cron-job --add
|
|
args:
|
|
creates: /home/dokku/autonomic.zone/letsencrypt/cron-job
|
|
|
|
- name: Specify docker volume mounts
|
|
dokku_storage:
|
|
app: autonomic.zone
|
|
mounts:
|
|
- /home/dokku/autonomic.zone/letsencrypt/certs/current/key.pem:/etc/x509/https/tls.key
|
|
- /home/dokku/autonomic.zone/letsencrypt/certs/current/cert.pem:/etc/x509/https/tls.crt
|
|
|
|
- name: Set HTTP 443 port
|
|
dokku_ports:
|
|
app: autonomic.zone
|
|
mappings:
|
|
- "https:443:{{ http_port }}"
|
|
state: present
|
|
|
|
- name: Remove automatically configured ports
|
|
dokku_ports:
|
|
app: autonomic.zone
|
|
mappings:
|
|
- "http:4000:4000"
|
|
state: absent
|