2024-03-05 08:12:04 +00:00
|
|
|
---
|
|
|
|
# roles/docker/tasks/compose.yml
|
2024-03-05 08:08:10 +00:00
|
|
|
- name: "Create {{ core_docker_compose_name }} directories."
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: '{{ core_docker_compose_dirs_loop }}'
|
|
|
|
state: directory
|
2024-03-05 08:33:28 +00:00
|
|
|
owner: '{{ core_docker_compose_dirs_user }}'
|
|
|
|
group: '{{ core_docker_compose_dirs_group }}'
|
2024-03-05 08:08:10 +00:00
|
|
|
mode: "{{ core_docker_compose_dirs_mode }}"
|
|
|
|
loop: '{{ core_docker_compose_dirs }}'
|
|
|
|
loop_control:
|
|
|
|
loop_var: core_docker_compose_dirs_loop
|
|
|
|
when: core_docker_compose_mkdir
|
|
|
|
|
|
|
|
- name: "Create {{ core_docker_compose_name }} files"
|
|
|
|
ansible.builtin.template:
|
2024-03-05 09:16:19 +00:00
|
|
|
src: "{{ core_docker_compose_template_loop.src }}"
|
|
|
|
dest: "{{ core_docker_compose_template_loop.dest }}"
|
|
|
|
owner: "{{ core_docker_compose_template_user }}"
|
|
|
|
group: "{{ core_docker_compose_template_group }}"
|
|
|
|
mode: "{{ core_docker_compose_templates_mode }}"
|
|
|
|
loop: "{{ core_docker_compose_templates }}"
|
2024-03-05 08:08:10 +00:00
|
|
|
loop_control:
|
2024-03-05 09:16:19 +00:00
|
|
|
loop_var: core_docker_compose_template_loop
|
2024-03-05 08:33:28 +00:00
|
|
|
when: core_docker_compose_cp_templates
|
2024-03-05 08:08:10 +00:00
|
|
|
|
|
|
|
- name: "Create docker-compose.yml for {{ core_docker_compose_name }}"
|
|
|
|
ansible.builtin.template:
|
2024-03-05 11:50:41 +00:00
|
|
|
src: "{{ lookup('file', core_docker_compose_file.src) }}"
|
2024-03-05 08:08:10 +00:00
|
|
|
dest: '{{ core_docker_compose_file.dest }}'
|
|
|
|
owner: '{{ core_docker_compose_compose_user }}'
|
|
|
|
group: '{{ core_docker_compose_compose_group }}'
|
2024-03-05 11:50:41 +00:00
|
|
|
mode: '{{ core_docker_compose_mode }}'
|