remove minio (#252)
Reviewed-on: #252 Co-authored-by: Michael Grote <michael.grote@posteo.de> Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
61fc3f4afb
commit
e0f8219b8f
10 changed files with 10 additions and 20 deletions
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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:
|
||||
|
|
|
@ -53,9 +53,6 @@ compose_files:
|
|||
- name: lldap
|
||||
state: present
|
||||
network: traefik
|
||||
- name: minio
|
||||
state: present
|
||||
network: traefik
|
||||
|
||||
### oefenweb.ufw
|
||||
ufw_rules:
|
||||
|
|
|
@ -25,6 +25,3 @@
|
|||
- role: mgrote_docker_housekeeping
|
||||
tags: "housekeeping"
|
||||
become: true
|
||||
- role: mgrote_minio_configure
|
||||
tags: "minio"
|
||||
become: true
|
||||
|
|
Loading…
Reference in a new issue