attach
This commit is contained in:
parent
e1e1151759
commit
1b8beb0e9d
2 changed files with 9 additions and 1 deletions
|
@ -10,8 +10,12 @@ minio_config_dir: /etc/minio
|
|||
minio_users:
|
||||
- name: testuser5
|
||||
secret: hallowelt
|
||||
policies:
|
||||
- testbucket1_rw
|
||||
- name: testuser6
|
||||
secret: hallowelt2
|
||||
policies:
|
||||
- testbucket3_ro
|
||||
|
||||
minio_buckets:
|
||||
- name: testbucket1
|
||||
|
@ -59,7 +63,7 @@ minio_policies:
|
|||
}
|
||||
]
|
||||
}
|
||||
- name: testbucketw_ro
|
||||
- name: testbucket3_ro
|
||||
policy: |
|
||||
{
|
||||
"Version": "2012-10-17",
|
||||
|
|
|
@ -17,3 +17,7 @@
|
|||
- name: setup minio policies
|
||||
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ item.name }} {{ minio_config_dir }}/{{ item.name }}"
|
||||
loop: "{{ minio_policies }}"
|
||||
|
||||
- name: Assign MinIO policies to users
|
||||
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ item.1 }} --user {{ item.0.name }}"
|
||||
loop: "{{ minio_users | subelements('policies') }}"
|
||||
|
|
Loading…
Reference in a new issue