Try to use the with_items include syntax correctly again
This commit is contained in:
@ -1,32 +1,31 @@
|
||||
---
|
||||
- name: Run database setup tasks
|
||||
when: db is defined
|
||||
block:
|
||||
- name: Set database facts
|
||||
set_fact:
|
||||
mount_map:
|
||||
mariadb: /var/lib/mysql
|
||||
|
||||
- name: "Create {{ item.type }} database"
|
||||
- name: "Create {{ store.type }} database"
|
||||
no_log: true
|
||||
shell: "
|
||||
dokku
|
||||
{{ item.type }}:create
|
||||
{{ store.type }}:create
|
||||
{{ app }}
|
||||
--password {{ item.passwd }}
|
||||
--root-password {{ item.root_passwd }}
|
||||
--password {{ store.passwd }}
|
||||
--root-password {{ store.root_passwd }}
|
||||
"
|
||||
args:
|
||||
creates: "/var/lib/dokku/services/{{ item.type }}/{{ app }}"
|
||||
creates: "/var/lib/dokku/services/{{ store.type }}/{{ app }}"
|
||||
|
||||
- name: "Link {{ item.type }} database to application"
|
||||
- name: "Link {{ store.type }} database to application"
|
||||
dokku_service_link:
|
||||
app: "{{ app }}"
|
||||
name: "{{ app }}"
|
||||
service: "{{ item.type }}"
|
||||
service: "{{ store.type }}"
|
||||
|
||||
- name: "Specify {{ item.type }} volume mounts"
|
||||
- name: "Specify {{ store.type }} volume mounts"
|
||||
dokku_storage:
|
||||
app: "{{ app }}"
|
||||
mounts:
|
||||
- "/var/lib/dokku/services/{{ item.type }}/{{ app }}:{{ mount_map[item.type] }}"
|
||||
- "/var/lib/dokku/services/{{ store.type }}/{{ app }}:{{ mount_map[store.type] }}"
|
||||
|
Reference in New Issue
Block a user