homeserver/friedhof/mgrote_minio_configure/tasks/client.yml
Michael Grote 2b48b9fe6f
All checks were successful
ansible-lint / gitleaks (pull_request) Successful in 5s
ansible-lint / Ansible Lint (pull_request) Successful in 49s
changed Files: friedhof/mgrote_minio_configure/defaults/main.yml
friedhof/mgrote_minio_configure/tasks/bucket.yml
friedhof/mgrote_minio_configure/tasks/client.yml
friedhof/mgrote_minio_configure/tasks/main.yml
friedhof/mgrote_minio_configure/tasks/policy.yml
friedhof/mgrote_minio_configure/templates/policy_ro.j2
friedhof/mgrote_minio_configure/templates/policy_rw.j2
group_vars/docker.yml
host_vars/docker10.mgrote.net.yml
playbooks/3_service/docker.yml

Signed-off-by: Michael Grote <michael.grote@posteo.de>
2024-11-24 21:04:36 +00:00

32 lines
1.3 KiB
YAML

---
# stolen and adapted from: https://github.com/atosatto/ansible-minio/blob/master/tasks/install-client.yml
- name: Compose the Minio client download base url
ansible.builtin.set_fact:
_minio_client_download_base_url: "https://dl.minio.io/client/mc/release/linux-amd64"
- name: Compose the Minio client download url with lastest release
ansible.builtin.set_fact:
_minio_client_download_url: "{{ _minio_client_download_base_url }}/mc"
when: minio_client_release | length == 0
- name: "Compose the Minio client download url with release {{ minio_client_release }}"
ansible.builtin.set_fact:
_minio_client_download_url: "{{ _minio_client_download_base_url }}/archive/mc.{{ minio_client_release }}"
when: minio_client_release | length > 0
- name: "Get the Minio client checksum for amd64 architecture"
ansible.builtin.set_fact:
_minio_client_checksum: "{{ lookup('url', _minio_client_download_url + '.sha256sum').split(' ')[0] }}"
- name: Download the Minio client
ansible.builtin.get_url:
url: "{{ _minio_client_download_url }}"
dest: "{{ minio_client_bin }}"
owner: "root"
group: "root"
mode: "0755"
checksum: "sha256:{{ _minio_client_checksum }}"
register: _download_client
until: _download_client is succeeded
retries: 5
delay: 2