lab-ansible/roles/apps/tasks/configure_app.yml

21 lines
623 B
YAML

# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Create volume folder for app {{ app_name }}
ansible.builtin.file:
name: "{{ app_vars.volume }}"
owner: root
mode: u=rwx,go=
state: directory
- name: Upload Compose file for app {{ app_name }}
ansible.builtin.template:
src: compose-files/{{ app_name }}.yml.j2
dest: "{{ app_vars.volume }}/docker-compose.yml"
owner: root
mode: u=rw,go=
- name: Run extra configuration tasks for app {{ app_name }}
ansible.builtin.include_tasks: extra_tasks/{{ app_name }}.yml
when: app_vars.extra_tasks is defined and app_vars.extra_tasks