2024-11-09 10:34:23 +01:00
|
|
|
---
|
|
|
|
- name: create needed dirs
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ minio_config_dir }}"
|
|
|
|
state: directory
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: '0644'
|
|
|
|
|
|
|
|
- name: create policy files
|
|
|
|
ansible.builtin.blockinfile:
|
|
|
|
path: "{{ minio_config_dir }}/{{ item.name }}"
|
|
|
|
block: "{{ item.policy }}"
|
|
|
|
state: present
|
|
|
|
loop: "{{ minio_policies }}"
|
|
|
|
|
|
|
|
- name: setup minio policies
|
|
|
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ item.name }} {{ minio_config_dir }}/{{ item.name }}"
|
|
|
|
loop: "{{ minio_policies }}"
|