49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
---
|
|
- 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
|
|
|
|
# bug:delegate to geht nciht
|
|
# no_log überall bei keys und users
|
|
# linter
|
|
# succssfu/changed_when
|
|
# state absent einbauen
|
|
|
|
- name: include policy tasks
|
|
ansible.builtin.include_tasks: policy.yml
|
|
|
|
- name: include bucket tasks
|
|
ansible.builtin.include_tasks: bucket.yml
|
|
|
|
- name: Add a Minio user
|
|
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 }}"
|
|
|
|
- name: get all access keys (is set to true)
|
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} --all"
|
|
when: minio_print_keys
|
|
register: all_keys
|
|
changed_when: false
|
|
|
|
- name: geprintt all access keys (is set to true)
|
|
ansible.builtin.debug:
|
|
msg: "{{ all_keys.stdout_lines }}"
|
|
when: minio_print_keys
|
|
|
|
|
|
# https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_alias/ + pip3 install minio
|