setup minio automation #229

Merged
mg merged 114 commits from minio_automation into master 2024-11-09 22:00:58 +01:00
Showing only changes of commit 18d70c1a7d - Show all commits

View file

@ -1,6 +1,6 @@
--- ---
# https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_policy/ ? # https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_policy/ ?
- name: create needed dirs - name: create needed dirs
ansible.builtin.file: ansible.builtin.file:
path: "{{ minio_config_dir }}" path: "{{ minio_config_dir }}"
state: directory state: directory
@ -8,6 +8,15 @@
group: root group: root
mode: '0644' mode: '0644'
- name: create needed files
ansible.builtin.file:
path: "{{ minio_config_dir }}"
state: touch
owner: root
group: root
mode: '0644'
loop: "{{ minio_policies }}"
- name: create policy files - name: create policy files
ansible.builtin.blockinfile: ansible.builtin.blockinfile:
path: "{{ minio_config_dir }}/{{ item.name }}" path: "{{ minio_config_dir }}/{{ item.name }}"
@ -22,3 +31,6 @@
- name: Assign MinIO policies to users - name: Assign MinIO policies to users
ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ item.1 }} --user {{ item.0.name }}" ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ item.1 }} --user {{ item.0.name }}"
loop: "{{ minio_users | subelements('policies') }}" loop: "{{ minio_users | subelements('policies') }}"
# ensure absent files are removed
# deletata to localhost