44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
---
|
|
- name: Create MinIO directories
|
|
ansible.builtin.file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
mode: '0755'
|
|
loop:
|
|
- "{{ minio_data_dir }}"
|
|
- "{{ minio_data_dir }}/data"
|
|
|
|
- name: Deploy MinIO docker-compose
|
|
ansible.builtin.template:
|
|
src: docker-compose.yml.j2
|
|
dest: "{{ minio_data_dir }}/docker-compose.yml"
|
|
mode: '0644'
|
|
notify: restart minio
|
|
|
|
- name: Start MinIO
|
|
community.docker.docker_compose_v2:
|
|
project_src: "{{ minio_data_dir }}"
|
|
state: present
|
|
when: not (molecule_test_mode | default(false))
|
|
|
|
- name: Wait for MinIO to be ready
|
|
ansible.builtin.uri:
|
|
url: "http://localhost:9010/minio/health/live"
|
|
method: GET
|
|
status_code: 200
|
|
register: result
|
|
until: result.status == 200
|
|
retries: 15
|
|
delay: 5
|
|
when: not (molecule_test_mode | default(false))
|
|
|
|
- name: Create Nextcloud bucket in MinIO
|
|
community.general.minio:
|
|
endpoint: "http://localhost:9010"
|
|
access_key: "{{ minio_root_user }}"
|
|
secret_key: "{{ minio_root_password }}"
|
|
name: "{{ minio_nextcloud_bucket }}"
|
|
state: present
|
|
ignore_errors: true
|
|
when: not (molecule_test_mode | default(false))
|