diff --git a/roles/mgrote_minio_configure/tasks/user.yml b/roles/mgrote_minio_configure/tasks/user.yml index 7fec16ee..bef53dde 100644 --- a/roles/mgrote_minio_configure/tasks/user.yml +++ b/roles/mgrote_minio_configure/tasks/user.yml @@ -23,8 +23,9 @@ # > ./mc --dp admin accesskey list minio_root testuser7 # User: testuser7 -# 1. check if user has access keys +# 1. check if user has access keys{wenn access} # 2. when not create one, else skip +# whe exist, then display if param is set - name: get access keys ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} {{ item.name }}" @@ -34,6 +35,7 @@ - name: debug ansible.builtin.debug: msg: "{{ keys }}" + when: '"Access Keys:" in keys' - name: setup minio users ansible.builtin.command: "{{ minio_client_bin }} --dp admin user add {{ minio_root_alias }} {{ item.name }} {{ item.secret }}"