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

31 lines
802 B
YAML
Raw Permalink Normal View History

2024-01-09 20:36:49 +00:00
# vim: ft=yaml.ansible
# code: language=ansible
---
- name: Create app directory for {{ app }}
ansible.builtin.file:
path: "{{ apps_data_root }}/{{ app }}"
owner: root
2024-01-30 18:15:51 +00:00
group: root
2024-01-09 20:36:49 +00:00
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
2024-01-30 18:15:51 +00:00
group: root
2024-01-09 20:36:49 +00:00
mode: u=rw,go=
- name: Create data directory for {{ app }}
ansible.builtin.file:
path: "{{ apps_data_root }}/{{ app }}/data"
owner: root
2024-01-30 18:15:51 +00:00
group: root
2024-01-09 20:36:49 +00:00
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