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 - name: testuser5
secret: hallowelt secret: hallowelt
state: present state: present
policies: policy: testbucket1_rw
- testbucket1_rw
- name: testuser6 - name: testuser6
secret: hallowelt2 secret: hallowelt2
state: present state: present
policies: policy: testbucket3_ro
- testbucket3_ro
- name: testuserwer - name: testuserwer
secret: hallowelt2 secret: hallowelt2
state: present state: present
policies: policy: testbucket3_ro
- testbucket3_ro
- testbucket1_rw
minio_buckets: minio_buckets:
- name: testbucket1 - name: testbucket1

View file

@ -27,6 +27,7 @@
dubzland.minio.minio_user: dubzland.minio.minio_user:
access_key: "{{ item.name }}" access_key: "{{ item.name }}"
secret_key: "{{ item.secret }}" secret_key: "{{ item.secret }}"
policy: "{{ item.policy }}"
auth: auth:
access_key: "{{ minio_root_access_key }}" access_key: "{{ minio_root_access_key }}"
secret_key: "{{ minio_root_secret_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" 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 }}" 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 # ensure absent files are removed
# deletata to localhost # deletata to localhost