This commit is contained in:
Michael Grote 2024-11-09 20:28:46 +01:00
parent 6499fee730
commit 210f4826dd

View file

@ -26,10 +26,16 @@
mode: '0644'
loop: "{{ minio_policies }}"
- name: setup minio policies
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ item.bucket }} {{ minio_config_dir }}/{{ item.bucket }}"
- name: setup minio policies ro
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.bucket }} {{ minio_config_dir }}/{{ item.bucket }}_rw"
loop: "{{ minio_policies }}"
- name: setup minio policies ro
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.bucket }} {{ minio_config_dir }}/{{ item.bucket }}_ro"
loop: "{{ minio_policies }}"
- name: Assign MinIO policies to users
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ item.1 }} --user {{ item.0.name }}"
loop: "{{ minio_users | subelements('policies') }}"