infra/ansible/roles/services/tasks/main.yaml
shockrah 3c6bc90feb
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 5s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 15s
health container and filebrowser container now active
Configuration needed at this point however
2025-04-16 20:28:48 -07:00

32 lines
877 B
YAML

- name: Ensure docker dir is present
ansible.builtin.file:
path: "{{ services.compose_dir }}"
state: directory
mode: "0755"
- name: Collect id -u result
ansible.builtin.command:
cmd: id -u
register: id_u
changed_when: false
- name: Collect id -g result
ansible.builtin.command:
cmd: id -g
register: id_g
changed_when: false
- name: Ensure compose.yaml is present
vars:
puid: "{{ id_u.stdout }}"
pgid: "{{ id_g.stdout }}"
health_port: "{{ services.health.port }}"
ansible.builtin.template:
src: compose.yaml
dest: "{{ services.compose_dir }}/compose.yaml"
mode: "0644"
- name: Apply docker compose with services
community.docker.docker_compose_v2:
project_src: "{{ services.compose_dir }}"
register: compose_output
- name: Show output of docker compose apply
ansible.builtin.debug:
var: compose_output