setup minio automation #229
2 changed files with 3 additions and 4 deletions
|
@ -1,11 +1,10 @@
|
||||||
---
|
---
|
||||||
- name: Ensure buckets exists
|
- name: Setup buckets
|
||||||
dubzland.minio.minio_bucket:
|
dubzland.minio.minio_bucket:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
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 }}"
|
||||||
url: "{{ minio_url }}"
|
url: "{{ minio_url }}"
|
||||||
state: "{{ item.state | default('present') }}"
|
state: "{{ item.state }}"
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
# state mit default
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.name }}_rw {{ minio_config_dir }}/{{ item.name }}_rw"
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.name }}_rw {{ minio_config_dir }}/{{ item.name }}_rw"
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
|
|
||||||
- name: "remove old policies"
|
- name: "remove old policy files"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ minio_config_dir }}/{{ item.name }}_ro"
|
path: "{{ minio_config_dir }}/{{ item.name }}_ro"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
Loading…
Reference in a new issue