This repository has been archived on 2020-06-17. You can view files and clone it, but cannot push or open issues or pull requests.
homebase/ansible/pre-deploy.yml
2020-03-25 18:51:34 +01:00

48 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: "Configure {{ domain }} domain"
dokku_domains:
app: homebase
domains:
- "{{ domain }}"
state: present
- name: Create application directories
file:
path: "{{ item }}"
state: directory
owner: dokku
group: dokku
with_items:
- /var/lib/homebase
become: true
- name: Specify docker volume mount
dokku_storage:
app: homebase
mounts:
- /var/lib/homebase:/root/
- name: Configure the app environment
dokku_config:
app: homebase
restart: false
config:
DOKKU_LETSENCRYPT_EMAIL: "{{ autonomic_admin_mail }}"
- name: Copy over the homebase configuration file
template:
src: homebase.yml.j2
dest: /var/lib/homebase/.homebase.yml
owner: dokku
group: dokku
become: true