2024-11-09 10:06:25 +01:00
|
|
|
---
|
2024-11-09 21:04:46 +01:00
|
|
|
# auf Zielhost benötigt: pip3 install minio
|
|
|
|
# auf ansible-controller: https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_alias/
|
|
|
|
|
2024-11-09 21:00:38 +01:00
|
|
|
- name: include mcli tasks
|
|
|
|
ansible.builtin.include_tasks: client.yml
|
2024-11-09 10:13:33 +01:00
|
|
|
|
2024-11-09 21:00:58 +01:00
|
|
|
- name: ensure mc alias exists
|
2024-11-09 18:45:03 +01:00
|
|
|
dubzland.minio.minio_alias:
|
2024-11-09 18:45:31 +01:00
|
|
|
name: "{{ minio_root_alias }}"
|
|
|
|
url: "{{ minio_url }}"
|
|
|
|
access_key: "{{ minio_root_access_key }}"
|
|
|
|
secret_key: "{{ minio_root_secret_key }}"
|
2024-11-09 18:45:03 +01:00
|
|
|
state: present
|
2024-11-09 18:50:36 +01:00
|
|
|
|
2024-11-09 19:13:45 +01:00
|
|
|
# bug:delegate to geht nciht
|
|
|
|
# no_log überall bei keys und users
|
|
|
|
# linter
|
|
|
|
# state absent einbauen
|
2024-11-09 10:16:52 +01:00
|
|
|
|
2024-11-09 18:49:50 +01:00
|
|
|
- name: include policy tasks
|
|
|
|
ansible.builtin.include_tasks: policy.yml
|
|
|
|
|
2024-11-09 10:49:03 +01:00
|
|
|
- name: include bucket tasks
|
|
|
|
ansible.builtin.include_tasks: bucket.yml
|
|
|
|
|
2024-11-09 21:04:46 +01:00
|
|
|
- name: Ensure users exist
|
2024-11-09 20:36:42 +01:00
|
|
|
dubzland.minio.minio_user:
|
|
|
|
access_key: "{{ item.name }}"
|
|
|
|
secret_key: "{{ item.secret }}"
|
2024-11-09 20:37:32 +01:00
|
|
|
policy: "{{ item.policy }}"
|
2024-11-09 20:36:42 +01:00
|
|
|
auth:
|
|
|
|
access_key: "{{ minio_root_access_key }}"
|
|
|
|
secret_key: "{{ minio_root_secret_key }}"
|
|
|
|
url: "{{ minio_url }}"
|
|
|
|
state: "{{ item.state | default('present') }}"
|
|
|
|
loop: "{{ minio_users }}"
|