remove minio #252
3 changed files with 11 additions and 0 deletions
|
@ -8,9 +8,11 @@
|
||||||
url: "{{ minio_url }}"
|
url: "{{ minio_url }}"
|
||||||
state: "{{ item.state | default('present') }}"
|
state: "{{ item.state | default('present') }}"
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: Deletion Info
|
- name: Deletion Info
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "Deletion only possible with empty bucket ({{ item.name }})"
|
msg: "Deletion only possible with empty bucket ({{ item.name }})"
|
||||||
when: '"absent" in item.state'
|
when: '"absent" in item.state'
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
- name: include mcli tasks
|
- name: include mcli tasks
|
||||||
ansible.builtin.include_tasks: client.yml
|
ansible.builtin.include_tasks: client.yml
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: ensure mc alias exists
|
- name: ensure mc alias exists
|
||||||
dubzland.minio.minio_alias:
|
dubzland.minio.minio_alias:
|
||||||
|
@ -12,6 +13,7 @@
|
||||||
access_key: "{{ minio_root_access_key }}"
|
access_key: "{{ minio_root_access_key }}"
|
||||||
secret_key: "{{ minio_root_secret_key }}"
|
secret_key: "{{ minio_root_secret_key }}"
|
||||||
state: present
|
state: present
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: include policy tasks
|
- name: include policy tasks
|
||||||
ansible.builtin.include_tasks: policy.yml
|
ansible.builtin.include_tasks: policy.yml
|
||||||
|
@ -31,6 +33,7 @@
|
||||||
state: "{{ item.state | default('present') }}"
|
state: "{{ item.state | default('present') }}"
|
||||||
loop: "{{ minio_users }}"
|
loop: "{{ minio_users }}"
|
||||||
no_log: "{{ no_debug | default('true') }}"
|
no_log: "{{ no_debug | default('true') }}"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
# Bug: delegate_to: localhost
|
# Bug: delegate_to: localhost
|
||||||
# in ansible-devspace wird das Python Paket "minio" nicht gefunden
|
# in ansible-devspace wird das Python Paket "minio" nicht gefunden
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: "prep: template policy files (ro)"
|
- name: "prep: template policy files (ro)"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: "prep: template policy files (rw)"
|
- name: "prep: template policy files (rw)"
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
|
@ -25,16 +27,19 @@
|
||||||
group: root
|
group: root
|
||||||
mode: '0644'
|
mode: '0644'
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
|
delegate_to: localhost
|
||||||
|
|
||||||
- name: "setup policies (ro)"
|
- 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"
|
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 }}"
|
loop: "{{ minio_buckets }}"
|
||||||
changed_when: false # Befehl gibt immer "Created policy `testbucket3_ro` successfully." aus, unabhängig ob sie schon existiert oder nicht.
|
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)"
|
- 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"
|
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 }}"
|
loop: "{{ minio_buckets }}"
|
||||||
changed_when: false # Befehl gibt immer "Created policy `testbucket3_ro` successfully." aus, unabhängig ob sie schon existiert oder nicht.
|
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"
|
- name: "remove old policy files"
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
|
@ -42,3 +47,4 @@
|
||||||
state: absent
|
state: absent
|
||||||
loop: "{{ minio_buckets }}"
|
loop: "{{ minio_buckets }}"
|
||||||
when: '"absent" in item.state'
|
when: '"absent" in item.state'
|
||||||
|
delegate_to: localhost
|
||||||
|
|
Loading…
Reference in a new issue