39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
---
|
|
# https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_policy/ ?
|
|
- name: "ensure needed dirs exist"
|
|
ansible.builtin.file:
|
|
path: "{{ minio_config_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
|
|
- name: "prep: template policy files (ro)"
|
|
ansible.builtin.template:
|
|
dest: "{{ minio_config_dir }}/{{ item }}_ro"
|
|
src: policy_ro.j2
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
loop: "{{ minio_buckets }}"
|
|
|
|
- name: "prep: template policy files (rw)"
|
|
ansible.builtin.template:
|
|
dest: "{{ minio_config_dir }}/{{ item }}_rw"
|
|
src: policy_rw.j2
|
|
owner: root
|
|
group: root
|
|
mode: '0644'
|
|
loop: "{{ minio_buckets }}"
|
|
|
|
- name: "setup policies (ro)"
|
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item }}_ro {{ minio_config_dir }}/{{ item }}_ro"
|
|
loop: "{{ minio_buckets }}"
|
|
|
|
- name: "setup policies (rw)"
|
|
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item }}_rw {{ minio_config_dir }}/{{ item }}_rw"
|
|
loop: "{{ minio_buckets }}"
|
|
|
|
# ensure absent files are removed
|
|
# deletata to localhost
|
|
# changed when überall
|