diff --git a/roles/mgrote_minio_configure/tasks/policy.yml b/roles/mgrote_minio_configure/tasks/policy.yml index d9d3f27a..e1ecd986 100644 --- a/roles/mgrote_minio_configure/tasks/policy.yml +++ b/roles/mgrote_minio_configure/tasks/policy.yml @@ -34,10 +34,8 @@ ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.bucket }}_ro {{ 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 }}" + ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ minio_root_alias }} {{ item.1 }} --user {{ item.0.name }}" loop: "{{ minio_users | subelements('policies') }}" # ensure absent files are removed