setup minio automation #229
3 changed files with 4 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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 }}"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue