setup minio automation #229

Merged
mg merged 114 commits from minio_automation into master 2024-11-09 22:00:58 +01:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit ae1b2c8021 - Show all commits

View file

@ -8,3 +8,4 @@
url: "{{ minio_url }}" url: "{{ minio_url }}"
state: present state: present
loop: "{{ minio_buckets }}" loop: "{{ minio_buckets }}"
# state mit default

View file

@ -1,4 +1,7 @@
--- ---
# auf Zielhost benötigt: pip3 install minio
# auf ansible-controller: https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_alias/
- name: include mcli tasks - name: include mcli tasks
ansible.builtin.include_tasks: client.yml ansible.builtin.include_tasks: client.yml
@ -22,7 +25,7 @@
- name: include bucket tasks - name: include bucket tasks
ansible.builtin.include_tasks: bucket.yml ansible.builtin.include_tasks: bucket.yml
- name: Add a Minio user - name: Ensure users exist
dubzland.minio.minio_user: dubzland.minio.minio_user:
access_key: "{{ item.name }}" access_key: "{{ item.name }}"
secret_key: "{{ item.secret }}" secret_key: "{{ item.secret }}"
@ -34,16 +37,13 @@
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
loop: "{{ minio_users }}" loop: "{{ minio_users }}"
- name: get all access keys (is set to true) - name: "get all access keys (if set to true)"
ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} --all" ansible.builtin.command: "{{ minio_client_bin }} --dp admin accesskey list {{ minio_root_alias }} --all"
when: minio_print_keys when: minio_print_keys
register: all_keys register: all_keys
changed_when: false changed_when: false
- name: geprintt all access keys (is set to true) - name: "print all access keys (if set to true)"
ansible.builtin.debug: ansible.builtin.debug:
msg: "{{ all_keys.stdout_lines }}" msg: "{{ all_keys.stdout_lines }}"
when: minio_print_keys when: minio_print_keys
# https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_alias/ + pip3 install minio