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

28 lines
823 B
YAML
Raw Normal View History

# vim: ft=yaml.ansible
# code: language=ansible
---
2023-11-05 17:27:49 +00:00
- name: Create app folder for {{ app_name }}
ansible.builtin.file:
2023-11-05 17:27:49 +00:00
name: "{{ apps_data_root }}/{{ app_name }}"
owner: root
mode: u=rwx,go=
state: directory
2023-11-05 17:27:49 +00:00
- name: Upload Compose file for {{ app_name }}
ansible.builtin.template:
src: compose-files/{{ app_name }}.yml.j2
2023-11-05 17:27:49 +00:00
dest: "{{ apps_data_root }}/{{ app_name }}/docker-compose.yml"
owner: root
mode: u=rw,go=
2023-11-05 17:27:49 +00:00
- name: Create data folder for {{ app_name }}
ansible.builtin.file:
name: "{{ 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 is defined and app_vars.extra_tasks