diff --git a/roles/mgrote_minio_configure/defaults/main.yml b/roles/mgrote_minio_configure/defaults/main.yml index d72baeac..0b704ba6 100644 --- a/roles/mgrote_minio_configure/defaults/main.yml +++ b/roles/mgrote_minio_configure/defaults/main.yml @@ -6,6 +6,7 @@ minio_url: https://s3.mgrote.net minio_config_dir: /etc/minio minio_client_release: "" minio_client_bin: /usr/local/bin/mc +minio_print_keys: true # zeige secret in playbook # --dp ausschreiben diff --git a/roles/mgrote_minio_configure/tasks/user.yml b/roles/mgrote_minio_configure/tasks/user.yml index dcc64aab..58b01c39 100644 --- a/roles/mgrote_minio_configure/tasks/user.yml +++ b/roles/mgrote_minio_configure/tasks/user.yml @@ -44,17 +44,10 @@ when: "'Access Keys:' not in item.stdout" register: new_keys -- name: Debug Print users with access keys - ansible.builtin.debug: - msg: "{{ item.stdout }}" - loop: "{{ new_keys.item }}" - -- name: Output newly created access keys - ansible.builtin.debug: - msg: "New access key created for user {{ item.item.name }}: {{ item.stdout }}" - loop: "{{ new_keys.results }}" - when: item.item is defined - +- name: Print all access keys (is set to true) + ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} --all" + when: minio_print_keys +# verschieben ans ende