diff --git a/roles/mgrote_minio_configure/defaults/main.yml b/roles/mgrote_minio_configure/defaults/main.yml index dda78b5e..24c251bb 100644 --- a/roles/mgrote_minio_configure/defaults/main.yml +++ b/roles/mgrote_minio_configure/defaults/main.yml @@ -3,3 +3,11 @@ minio_root_access_key: minio_root_secret_key: minio_root_alias: minio_ansible_root minio_url: https://s3.mgrote.net + +# --dp ausschreiben + +minio_users: + - name: testuser5 + secret: hallowelt + - name: testuser6 + secret: hallowelt2 diff --git a/roles/mgrote_minio_configure/tasks/main.yml b/roles/mgrote_minio_configure/tasks/main.yml index e05307dd..6aea6266 100644 --- a/roles/mgrote_minio_configure/tasks/main.yml +++ b/roles/mgrote_minio_configure/tasks/main.yml @@ -3,4 +3,7 @@ ansible.builtin.include_tasks: client.yml - name: ensure alias exists - ansible.builtin.command: "{{ minio_client_bin }} alias set {{ minio_root_alias }} {{ minio_url }} {{ minio_root_access_key }} {{ minio_root_secret_key }}" + ansible.builtin.command: "{{ minio_client_bin }} --dp alias set {{ minio_root_alias }} {{ minio_url }} {{ minio_root_access_key }} {{ minio_root_secret_key }}" + +- name: include user tasks + ansible.builtin.include_tasks: user.yml diff --git a/roles/mgrote_minio_configure/tasks/user.yml b/roles/mgrote_minio_configure/tasks/user.yml index e69de29b..25ea5fbc 100644 --- a/roles/mgrote_minio_configure/tasks/user.yml +++ b/roles/mgrote_minio_configure/tasks/user.yml @@ -0,0 +1,4 @@ +--- +- name: setup minio users + ansible.builtin.command: "{{ minio_client_bin }} --dp admin user add {{ minio_root_alias }} {{ item.user }} {{ item.secret }}" + loop: "{{ minio_users }}"