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

28 lines
787 B
YAML

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