lab-ansible/roles/apps/tasks/app.yml
2024-01-09 21:56:17 +01:00

28 lines
754 B
YAML

# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Create app directory for {{ app }}
ansible.builtin.file:
path: "{{ apps_data_root }}/{{ app }}"
owner: root
mode: u=rwx,go=
state: directory
- name: Upload Compose file for {{ app }}
ansible.builtin.template:
src: compose-files/{{ app }}.yml.j2
dest: "{{ apps_data_root }}/{{ app }}/docker-compose.yml"
owner: root
mode: u=rw,go=
- name: Create data directory for {{ app }}
ansible.builtin.file:
path: "{{ apps_data_root }}/{{ app }}/data"
owner: root
mode: u=rwx,g=rx,o=rx
state: directory
- name: Run extra configuration tasks for {{ app }}
ansible.builtin.include_tasks: extra_tasks/{{ app }}.yml
when: apps_vars[app].extra_tasks