infra/ansible/roles/services/tasks/main.yaml
shockrah b68d53b143
Some checks failed
Ansible Linting / ansible-lint (push) Failing after 4s
Secops Linting and Safety Checks / checkov-scan-s3 (push) Failing after 14s
Opting for an example minio setup over filebrowser
2025-04-16 21:00:39 -07:00

33 lines
902 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 }}"
remove_orphans: true
register: compose_output
- name: Show output of docker compose apply
ansible.builtin.debug:
var: compose_output