From 0f01e60978114d9893ab3acfc9464836b1081055 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sat, 9 Nov 2024 19:13:45 +0100 Subject: [PATCH] dsfg --- roles/mgrote_minio_configure/tasks/main.yml | 22 ++++++++++++++++----- roles/mgrote_minio_configure/tasks/user.yml | 19 ------------------ 2 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 roles/mgrote_minio_configure/tasks/user.yml diff --git a/roles/mgrote_minio_configure/tasks/main.yml b/roles/mgrote_minio_configure/tasks/main.yml index 71506925..a38a5b2e 100644 --- a/roles/mgrote_minio_configure/tasks/main.yml +++ b/roles/mgrote_minio_configure/tasks/main.yml @@ -2,19 +2,31 @@ #- name: include client tasks # einkommentieren!!!!!!!!!!!!!! # ansible.builtin.include_tasks: client.yml - - name: ensure alias exists -# ansible.builtin.command: "{{ minio_client_bin }} --dp alias set {{ minio_root_alias }} {{ minio_url }} {{ minio_root_access_key }} {{ minio_root_secret_key }}" 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 - -- name: include user tasks - ansible.builtin.include_tasks: user.yml +- name: Add a Minio user + dubzland.minio.minio_user: + access_key: "{{ item.name }}" + secret_key: "{{ item.secret }}" + auth: + access_key: "{{ minio_root_access_key }}" + secret_key: "{{ minio_root_secret_key }}" + url: "{{ minio_url }}" + state: "{{ item.state | default('present') }}" + loop: "{{ minio_users }}" + +# bug:delegate to geht nciht +# TASK [mgrote_minio_configure : Add a Minio user] ***************************************************************************************************************************************************************failed: [docker10.mgrote.net -> localhost] (item={'name': 'testuser5', 'secret': 'hallowelt', 'state': 'present', 'policies': ['testbucket1_rw']}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "testuser5", "policies": ["testbucket1_rw"], "secret": "hallowelt", "state": "present"}, "msg": "Failed to import the required Python library (minio) on 398016b0e4b9's Python /usr/local/bin/python3. See https://min.io/docs/minio/linux/developers/python/minio-py.html for more info. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"} +# no_log überall bei keys und users +# linter +# succssfu/changed_when +# state absent einbauen - name: include policy tasks ansible.builtin.include_tasks: policy.yml diff --git a/roles/mgrote_minio_configure/tasks/user.yml b/roles/mgrote_minio_configure/tasks/user.yml deleted file mode 100644 index 542e73d6..00000000 --- a/roles/mgrote_minio_configure/tasks/user.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -- name: Add a Minio user - dubzland.minio.minio_user: - access_key: "{{ item.name }}" - secret_key: "{{ item.secret }}" - auth: - access_key: "{{ minio_root_access_key }}" - secret_key: "{{ minio_root_secret_key }}" - url: "{{ minio_url }}" - state: "{{ item.state | default('present') }}" - # policy: - loop: "{{ minio_users }}" - -# bug:delegate to geht nciht -# TASK [mgrote_minio_configure : Add a Minio user] ***************************************************************************************************************************************************************failed: [docker10.mgrote.net -> localhost] (item={'name': 'testuser5', 'secret': 'hallowelt', 'state': 'present', 'policies': ['testbucket1_rw']}) => {"ansible_loop_var": "item", "changed": false, "item": {"name": "testuser5", "policies": ["testbucket1_rw"], "secret": "hallowelt", "state": "present"}, "msg": "Failed to import the required Python library (minio) on 398016b0e4b9's Python /usr/local/bin/python3. See https://min.io/docs/minio/linux/developers/python/minio-py.html for more info. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"} -# no_log überall bei keys und users -# linter -# succssfu/changed_when -# state absent einbauen