feat(docker): Move compose content to ansible group vars

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2025-01-17 01:31:10 +01:00
parent 1a1b8cb69c
commit e68d534e4f
7 changed files with 513 additions and 443 deletions

View File

@@ -1,14 +1,12 @@
---
- name: Copy docker compose file to target
ansible.builtin.template:
src: "templates/{{ item }}.j2"
dest: "/opt/docker/compose/{{ item }}"
src: "templates/compose.yaml.j2"
dest: "/opt/docker/compose/compose.yaml"
owner: "{{ user }}"
group: "{{ user }}"
mode: "644"
backup: true
loop:
- compose.yaml
notify:
- Restart docker
become: true

View File

@@ -34,6 +34,13 @@
mode: "0755"
become: true
- name: Create /opt/docker/compose directory
ansible.builtin.file:
path: /opt/docker/compose
state: directory
mode: "0755"
become: true
- name: Create /opt/local directory
ansible.builtin.file:
path: /opt/local