s3/tasks/main.yml

33 lines
919 B
YAML

---
- name: "set local variables from overrides and defaults"
set_fact:
minio: "{{ (minio_defaults | combine(minio_override, recursive=True)) if minio_override else minio_defaults }}"
- name: ensure that path exists
file:
path: "{{ path }}/config/minio"
state: directory
- name: template docker compose
template:
src: compose.yml.j2
dest: "{{ path }}/compose.yml"
- import_role:
name: storage_mount
vars:
storage_mount_override:
host: "{{ minio.networkmount.host }}"
host_path: "{{ minio.networkmount.host_path }}"
type: "{{ minio.networkmount.type }}"
args: "{{ minio.networkmount.args }}"
dest_path: "{{ minio.data_path }}"
when: minio.networkmount.host | length > 1
- name: ensure everything is up
community.docker.docker_compose_v2:
project_src: "{{ path }}"
project_name: "{{ role_name }}"
recreate: always
state: "present"