From 18d70c1a7d3144fea8ef803c87912eda84e7f370 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Sat, 9 Nov 2024 19:19:10 +0100 Subject: [PATCH] dd --- roles/mgrote_minio_configure/tasks/policy.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/mgrote_minio_configure/tasks/policy.yml b/roles/mgrote_minio_configure/tasks/policy.yml index 09c7a6d9..902c3a45 100644 --- a/roles/mgrote_minio_configure/tasks/policy.yml +++ b/roles/mgrote_minio_configure/tasks/policy.yml @@ -1,6 +1,6 @@ --- # https://galaxy.ansible.com/ui/repo/published/dubzland/minio/content/module/minio_policy/ ? -- name: create needed dirs +- name: create needed dirs ansible.builtin.file: path: "{{ minio_config_dir }}" state: directory @@ -8,6 +8,15 @@ group: root 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 ansible.builtin.blockinfile: path: "{{ minio_config_dir }}/{{ item.name }}" @@ -22,3 +31,6 @@ - name: Assign MinIO policies to users ansible.builtin.command: "{{ minio_client_bin }} --dp admin policy attach {{ item.1 }} --user {{ item.0.name }}" loop: "{{ minio_users | subelements('policies') }}" + +# ensure absent files are removed +# deletata to localhost