ansible-minio/tasks/install-client.yml
Sébastien Berthier 4de97d3a39 Add 'minio_server_release' and 'minio_client_release' variable.
- Default = "" = lastest
2019-07-18 11:20:41 +02:00

33 lines
1.1 KiB
YAML

---
- name: Compose the Minio client download base url
set_fact:
_minio_client_download_base_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch }}"
- name: Compose the Minio client download url with lastest release
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 }}"
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 {{ go_arch }} architecture"
set_fact:
_minio_client_checksum: "{{ lookup('url', _minio_client_download_url + '.sha256sum').split(' ')[0] }}"
- name: Download the Minio client
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