2025-08-16 20:52:29 +10:00

33 lines
876 B
YAML

---
- name: Ensure services destination directory exists
ansible.builtin.file:
path: "{{ server_services_dir }}"
state: directory
mode: '0755'
owner: "{{ ansible_user | default('root') }}"
group: "{{ ansible_user | default('root') }}"
- name: Copy service folder
ansible.builtin.copy:
src: "{{ source_services_dir }}/{{ item }}"
dest: "{{ server_services_dir }}"
mode: '0755'
owner: "{{ ansible_user | default('root') }}"
group: "{{ ansible_user | default('root') }}"
with_items: "{{ services }}"
- name: Docker Compose Start Service
community.docker.docker_compose_v2:
project_src: "{{ server_services_dir }}/{{ item }}"
# environment: "{{ compose_env }}"
check_files_existing: true
assume_yes: true
build: policy
wait: true
register: output
with_items: "{{ services }}"
async: 300
poll: 10