setup minio automation #229

Merged
mg merged 114 commits from minio_automation into master 2024-11-09 22:00:58 +01:00
2 changed files with 10 additions and 15 deletions
Showing only changes of commit 4bb9d734f1 - Show all commits

View file

@ -25,14 +25,9 @@ minio_users:
policy: testbucket3_ro
minio_buckets:
- name: testbucket1
- name: testbucket3
- testbucket1
- testbucket3
minio_policies: # pro nucket nur eine policy?
- bucket: testbucket1
policy: rw
- bucket: testbucket3
policy: ro
# auf docker10 aufraumen
# und irtantu

View file

@ -10,29 +10,29 @@
- name: "prep: template policy files (ro)"
ansible.builtin.template:
dest: "{{ minio_config_dir }}/{{ item.bucket }}_ro"
dest: "{{ minio_config_dir }}/{{ item }}_ro"
src: policy_ro.j2
owner: root
group: root
mode: '0644'
loop: "{{ minio_policies }}"
loop: "{{ minio_buckets }}"
- name: "prep: template policy files (rw)"
ansible.builtin.template:
dest: "{{ minio_config_dir }}/{{ item.bucket }}_rw"
dest: "{{ minio_config_dir }}/{{ item }}_rw"
src: policy_rw.j2
owner: root
group: root
mode: '0644'
loop: "{{ minio_policies }}"
loop: "{{ minio_buckets }}"
- name: "setup policies (ro)"
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy create {{ minio_root_alias }} {{ item.bucket }}_ro {{ minio_config_dir }}/{{ item.bucket }}_ro"
loop: "{{ minio_policies }}"
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.bucket }}_rw {{ minio_config_dir }}/{{ item.bucket }}_rw"
loop: "{{ minio_policies }}"
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