setup minio automation #229

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

View file

@ -14,19 +14,15 @@ minio_users:
- name: testuser5
secret: hallowelt
state: present
policies:
- testbucket1_rw
policy: testbucket1_rw
- name: testuser6
secret: hallowelt2
state: present
policies:
- testbucket3_ro
policy: testbucket3_ro
- name: testuserwer
secret: hallowelt2
state: present
policies:
- testbucket3_ro
- testbucket1_rw
policy: testbucket3_ro
minio_buckets:
- name: testbucket1

View file

@ -27,6 +27,7 @@
dubzland.minio.minio_user:
access_key: "{{ item.name }}"
secret_key: "{{ item.secret }}"
policy: "{{ item.policy }}"
auth:
access_key: "{{ minio_root_access_key }}"
secret_key: "{{ minio_root_secret_key }}"

View file

@ -34,9 +34,5 @@
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.bucket }}_ro {{ minio_config_dir }}/{{ item.bucket }}_ro"
loop: "{{ minio_policies }}"
- name: Assign MinIO policies to users
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ minio_root_alias }} {{ item.1 }} --user {{ item.0.name }}"
loop: "{{ minio_users | subelements('policies') }}"
# ensure absent files are removed
# deletata to localhost