ricsanfre/ansible-role-minio

Can't create a private bucket with the role

Closed this issue · 0 comments

S0obi commented

Hello @ricsanfre,
The minio_bucket.py library allows to provide an empty value for the policy field. Unfortunately, I was not able to find out how to provide a null value to the library, so that I can create a private bucket (no policy), instead of a public one with defined policy like "read-only".
I am guessing that we should change the role code to something like :

- name: "Create Buckets"
  minio_bucket:
    s3_url: "{{ minio_url }}"
    region: "{{ minio_site_region }}"
    name: "{{ bucket.name† }}"
    access_key: "{{ minio_root_user }}"
    secret_key: "{{ minio_root_password }}"
    state: present
    policy: "{{ bucket.policy | default(omit) }}"
    validate_certs: false
  with_items:
    - "{{ minio_buckets }}"
  loop_control:
    loop_var: "bucket"

Thanks in advance for your help,
Thibault