homeserver/friedhof/mgrote_minio_configure/tasks/main.yml
Michael Grote 2b48b9fe6f
All checks were successful
ansible-lint / gitleaks (pull_request) Successful in 5s
ansible-lint / Ansible Lint (pull_request) Successful in 49s
changed Files: friedhof/mgrote_minio_configure/defaults/main.yml
friedhof/mgrote_minio_configure/tasks/bucket.yml
friedhof/mgrote_minio_configure/tasks/client.yml
friedhof/mgrote_minio_configure/tasks/main.yml
friedhof/mgrote_minio_configure/tasks/policy.yml
friedhof/mgrote_minio_configure/templates/policy_ro.j2
friedhof/mgrote_minio_configure/templates/policy_rw.j2
group_vars/docker.yml
host_vars/docker10.mgrote.net.yml
playbooks/3_service/docker.yml

Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-11-24 21:04:36 +00:00

38 lines
1.2 KiB
YAML

---
# auf Zielhost benötigt: pip3 install minio
# auf ansible-controller: https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_alias/
- name: include mcli tasks
ansible.builtin.include_tasks: client.yml
- name: ensure mc alias exists
dubzland.minio.minio_alias:
name: "{{ minio_root_alias }}"
url: "{{ minio_url }}"
access_key: "{{ minio_root_access_key }}"
secret_key: "{{ minio_root_secret_key }}"
state: present
delegate_to: localhost
- name: include policy tasks
ansible.builtin.include_tasks: policy.yml
- name: include bucket tasks
ansible.builtin.include_tasks: bucket.yml
- name: Ensure users exist
dubzland.minio.minio_user:
access_key: "{{ item.name }}"
secret_key: "{{ item.secret }}"
policy: "{{ item.policy }}"
auth:
access_key: "{{ minio_root_access_key }}"
secret_key: "{{ minio_root_secret_key }}"
url: "{{ minio_url }}"
state: "{{ item.state | default('present') }}"
loop: "{{ minio_users }}"
no_log: "{{ no_debug | default('true') }}"
delegate_to: localhost
# Bug: delegate_to: localhost
# in ansible-devspace wird das Python Paket "minio" nicht gefunden