setup minio automation #229
1 changed files with 7 additions and 5 deletions
|
@ -27,7 +27,7 @@
|
||||||
# 2. when not create one, else skip
|
# 2. when not create one, else skip
|
||||||
# whe exist, then display if param is set
|
# whe exist, then display if param is set
|
||||||
|
|
||||||
- name: get access keys
|
- name: Get access keys for each user
|
||||||
ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} {{ item.name }}"
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} {{ item.name }}"
|
||||||
loop: "{{ minio_users }}"
|
loop: "{{ minio_users }}"
|
||||||
register: keys
|
register: keys
|
||||||
|
@ -38,10 +38,12 @@
|
||||||
loop: "{{ keys.results }}"
|
loop: "{{ keys.results }}"
|
||||||
when: "'Access Keys:' in item.stdout"
|
when: "'Access Keys:' in item.stdout"
|
||||||
|
|
||||||
- name: setup minio users
|
- name: Create access keys for users without them
|
||||||
ansible.builtin.command: "{{ minio_client_bin }} --dp admin user add {{ minio_root_alias }} {{ item.name }} {{ item.secret }}"
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey create {{ minio_root_alias }} {{ item.item.name }}"
|
||||||
loop: "{{ minio_users }}"
|
loop: "{{ keys.results }}"
|
||||||
when: keys
|
when: "'Access Keys:' not in item.stdout"
|
||||||
|
|
||||||
|
|
||||||
# mehrere keys pro user?
|
# mehrere keys pro user?
|
||||||
# wie ausgeben?
|
# wie ausgeben?
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue