diff --git a/roles/mgrote_minio_configure/defaults/main.yml b/friedhof/mgrote_minio_configure/defaults/main.yml similarity index 100% rename from roles/mgrote_minio_configure/defaults/main.yml rename to friedhof/mgrote_minio_configure/defaults/main.yml diff --git a/roles/mgrote_minio_configure/tasks/bucket.yml b/friedhof/mgrote_minio_configure/tasks/bucket.yml similarity index 90% rename from roles/mgrote_minio_configure/tasks/bucket.yml rename to friedhof/mgrote_minio_configure/tasks/bucket.yml index 68b461b3..6edf91ad 100644 --- a/roles/mgrote_minio_configure/tasks/bucket.yml +++ b/friedhof/mgrote_minio_configure/tasks/bucket.yml @@ -8,9 +8,11 @@ url: "{{ minio_url }}" state: "{{ item.state | default('present') }}" loop: "{{ minio_buckets }}" + delegate_to: localhost - name: Deletion Info ansible.builtin.debug: msg: "Deletion only possible with empty bucket ({{ item.name }})" when: '"absent" in item.state' loop: "{{ minio_buckets }}" + delegate_to: localhost diff --git a/roles/mgrote_minio_configure/tasks/client.yml b/friedhof/mgrote_minio_configure/tasks/client.yml similarity index 100% rename from roles/mgrote_minio_configure/tasks/client.yml rename to friedhof/mgrote_minio_configure/tasks/client.yml diff --git a/roles/mgrote_minio_configure/tasks/main.yml b/friedhof/mgrote_minio_configure/tasks/main.yml similarity index 95% rename from roles/mgrote_minio_configure/tasks/main.yml rename to friedhof/mgrote_minio_configure/tasks/main.yml index 621920ee..d66864bc 100644 --- a/roles/mgrote_minio_configure/tasks/main.yml +++ b/friedhof/mgrote_minio_configure/tasks/main.yml @@ -12,6 +12,7 @@ access_key: "{{ minio_root_access_key }}" secret_key: "{{ minio_root_secret_key }}" state: present + delegate_to: localhost - name: include policy tasks ansible.builtin.include_tasks: policy.yml @@ -31,6 +32,7 @@ state: "{{ item.state | default('present') }}" loop: "{{ minio_users }}" no_log: "{{ no_debug | default('true') }}" + delegate_to: localhost # Bug: delegate_to: localhost # in ansible-devspace wird das Python Paket "minio" nicht gefunden diff --git a/roles/mgrote_minio_configure/tasks/policy.yml b/friedhof/mgrote_minio_configure/tasks/policy.yml similarity index 91% rename from roles/mgrote_minio_configure/tasks/policy.yml rename to friedhof/mgrote_minio_configure/tasks/policy.yml index 0ef125eb..bdb9508c 100644 --- a/roles/mgrote_minio_configure/tasks/policy.yml +++ b/friedhof/mgrote_minio_configure/tasks/policy.yml @@ -7,6 +7,7 @@ owner: root group: root mode: '0644' + delegate_to: localhost - name: "prep: template policy files (ro)" ansible.builtin.template: @@ -16,6 +17,7 @@ group: root mode: '0644' loop: "{{ minio_buckets }}" + delegate_to: localhost - name: "prep: template policy files (rw)" ansible.builtin.template: @@ -25,16 +27,19 @@ group: root mode: '0644' loop: "{{ minio_buckets }}" + delegate_to: localhost - name: "setup policies (ro)" ansible.builtin.command: "{{ minio_client_bin }} --disable-pager admin policy create {{ minio_root_alias }} {{ item.name }}_ro {{ minio_config_dir }}/{{ item.name }}_ro" loop: "{{ minio_buckets }}" changed_when: false # Befehl gibt immer "Created policy `testbucket3_ro` successfully." aus, unabhängig ob sie schon existiert oder nicht. + delegate_to: localhost - name: "setup policies (rw)" ansible.builtin.command: "{{ minio_client_bin }} --disable-pager admin policy create {{ minio_root_alias }} {{ item.name }}_rw {{ minio_config_dir }}/{{ item.name }}_rw" loop: "{{ minio_buckets }}" changed_when: false # Befehl gibt immer "Created policy `testbucket3_ro` successfully." aus, unabhängig ob sie schon existiert oder nicht. + delegate_to: localhost - name: "remove old policy files" ansible.builtin.file: @@ -42,3 +47,4 @@ state: absent loop: "{{ minio_buckets }}" when: '"absent" in item.state' + delegate_to: localhost diff --git a/roles/mgrote_minio_configure/templates/policy_ro.j2 b/friedhof/mgrote_minio_configure/templates/policy_ro.j2 similarity index 100% rename from roles/mgrote_minio_configure/templates/policy_ro.j2 rename to friedhof/mgrote_minio_configure/templates/policy_ro.j2 diff --git a/roles/mgrote_minio_configure/templates/policy_rw.j2 b/friedhof/mgrote_minio_configure/templates/policy_rw.j2 similarity index 100% rename from roles/mgrote_minio_configure/templates/policy_rw.j2 rename to friedhof/mgrote_minio_configure/templates/policy_rw.j2 diff --git a/group_vars/docker.yml b/group_vars/docker.yml index 13fee0b2..ba96e136 100644 --- a/group_vars/docker.yml +++ b/group_vars/docker.yml @@ -1,17 +1,4 @@ --- -### mgrote_minio_configure -minio_url: https://s3.mgrote.net -minio_root_access_key: "{{ lookup('viczem.keepass.keepass', 'minio/minio_root_access_key', 'password') }}" -minio_root_secret_key: "{{ lookup('viczem.keepass.keepass', 'minio/minio_root_secret_key', 'password') }}" -minio_users: - - name: testuser - secret: "{{ lookup('viczem.keepass.keepass', 'minio/minio_testuser_secret_key', 'password') }}" - state: present - policy: testbucket_rw -minio_buckets: - - name: testbucket - state: present - ### mrlesmithjr.manage_lvm lvm_groups: - vgname: vg_docker @@ -32,7 +19,6 @@ pvresize_to_max: true pip_package: python3-pip pip_install_packages: - name: docker # für munin-plugin docker_ - - name: minio # für ansible-minio_configure-Rolle ### mgrote.apt_manage_packages apt_packages_extra: diff --git a/host_vars/docker10.mgrote.net.yml b/host_vars/docker10.mgrote.net.yml index 1bb9a7df..41bb4b48 100644 --- a/host_vars/docker10.mgrote.net.yml +++ b/host_vars/docker10.mgrote.net.yml @@ -53,9 +53,6 @@ compose_files: - name: lldap state: present network: traefik - - name: minio - state: present - network: traefik ### oefenweb.ufw ufw_rules: diff --git a/playbooks/3_service/docker.yml b/playbooks/3_service/docker.yml index f98c3a76..f103c1bb 100644 --- a/playbooks/3_service/docker.yml +++ b/playbooks/3_service/docker.yml @@ -25,6 +25,3 @@ - role: mgrote_docker_housekeeping tags: "housekeeping" become: true - - role: mgrote_minio_configure - tags: "minio" - become: true