Take another pass at wiring up steps
This commit is contained in:
parent
010b3fa863
commit
ccaf036248
@ -1,7 +1,11 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
|
- name: Run database setup tasks
|
||||||
|
when: db is defined
|
||||||
|
block:
|
||||||
- name: Setup preparatory facts
|
- name: Setup preparatory facts
|
||||||
set_fact:
|
set_fact:
|
||||||
db_type: "{{ db['type'] }}"
|
db_type: "{{ db.type }}"
|
||||||
mount_map:
|
mount_map:
|
||||||
mariadb: /var/lib/mysql
|
mariadb: /var/lib/mysql
|
||||||
|
|
||||||
|
@ -1,8 +1,23 @@
|
|||||||
---
|
---
|
||||||
- name: "Configure {{ domain }} domain with Dokku"
|
- name: "Configure {{ domain }} dedicated domain"
|
||||||
dokku_domains:
|
dokku_domains:
|
||||||
app: "{{ app }}"
|
app: "{{ app }}"
|
||||||
domains:
|
domains:
|
||||||
- "{{ domain }}"
|
- "{{ domain }}"
|
||||||
state: present
|
state: present
|
||||||
when: domain is defined
|
when: domain is defined
|
||||||
|
|
||||||
|
- name: Provide information on domain configuration
|
||||||
|
debug:
|
||||||
|
msg:
|
||||||
|
- "Dedicated domain discovered for the deployment of {{ app }}"
|
||||||
|
- "Your application will be available at https://{{ domain }}"
|
||||||
|
when: domain is defined
|
||||||
|
|
||||||
|
- name: Provide information on sub-domain configuration
|
||||||
|
debug:
|
||||||
|
msg:
|
||||||
|
- "No dedicated domain configured for the deployment of {{ app }}"
|
||||||
|
- "Dokku will provide a sub-domain configuration"
|
||||||
|
- "Your application will be available at https://{{ app }}.{{ dokku_hostname }}"
|
||||||
|
when: domain is not defined
|
||||||
|
9
plays/lib/prepare.yml
Normal file
9
plays/lib/prepare.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
# Note(decentral1se): to avoid exploding when we import the config.yml from the
|
||||||
|
# end-user, we spoof out variables that are referenced there but not populated
|
||||||
|
# already (due to the order of the tasks we define for our deployment steps)
|
||||||
|
- name: Export variable placeholders
|
||||||
|
set_fact:
|
||||||
|
dokku_db_addr: ""
|
||||||
|
dokku_db_user: ""
|
||||||
|
dokku_hostname: "{{ lookup('file', '/home/dokku/HOSTNAME') }}"
|
@ -8,5 +8,5 @@
|
|||||||
- yaml
|
- yaml
|
||||||
with_items:
|
with_items:
|
||||||
- "{{ plugin_config_root }}"
|
- "{{ plugin_config_root }}"
|
||||||
# - "{{ app_config_root }}"
|
- "{{ app_config_root }}/vault"
|
||||||
# - "{{ app_config_root }}/vault"
|
- "{{ app_config_root }}"
|
||||||
|
@ -2,15 +2,22 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Include vars tasks
|
# Note(decentral1se): internal debugging. Please `debug: true` in the
|
||||||
include: ./lib/vars.yml
|
# /var/lib/dokku/data/deploy.d/vars.yml file to activate a debug vars dump
|
||||||
- name: Include debug tasks
|
- name: Include debug tasks
|
||||||
include: ./lib/debug.yml
|
include: ./lib/debug.yml
|
||||||
# - name: Include http tasks
|
|
||||||
# include: ./lib/http.yml
|
- name: Include vars tasks
|
||||||
# - name: Include certs tasks
|
include: ./lib/vars.yml
|
||||||
# include: ./lib/certs.yml
|
|
||||||
# - name: Include proxy tasks
|
- name: Include http tasks
|
||||||
# include: ./lib/proxy.yml
|
include: ./lib/http.yml
|
||||||
# - name: Include https tasks
|
|
||||||
# include: ./lib/https.yml
|
- name: Include certs tasks
|
||||||
|
include: ./lib/certs.yml
|
||||||
|
|
||||||
|
- name: Include proxy tasks
|
||||||
|
include: ./lib/proxy.yml
|
||||||
|
|
||||||
|
- name: Include https tasks
|
||||||
|
include: ./lib/https.yml
|
||||||
|
@ -2,11 +2,22 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
tasks:
|
tasks:
|
||||||
- name: Include vars tasks
|
# Note(decentral1se): internal debugging. Please `debug: true` in the
|
||||||
include: ./lib/vars.yml
|
# /var/lib/dokku/data/deploy.d/vars.yml file to activate a debug vars dump
|
||||||
- name: Include debug tasks
|
- name: Include debug tasks
|
||||||
include: ./lib/debug.yml
|
include: ./lib/debug.yml
|
||||||
# - name: Include domain tasks
|
|
||||||
# include: ./lib/domain.yml
|
- name: Include prepare tasks
|
||||||
# - name: Include env tasks
|
include: ./lib/prepare.yml
|
||||||
# include: ./lib/env.yml
|
|
||||||
|
- name: Include vars tasks
|
||||||
|
include: ./lib/vars.yml
|
||||||
|
|
||||||
|
- name: Include domain tasks
|
||||||
|
include: ./lib/domain.yml
|
||||||
|
|
||||||
|
- name: Include database tasks
|
||||||
|
include: ./lib/db.yml
|
||||||
|
|
||||||
|
- name: Include env tasks
|
||||||
|
include: ./lib/env.yml
|
||||||
|
Reference in New Issue
Block a user