diff --git a/README.md b/README.md index 9cf6ab8..86f4e3b 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,14 @@ minio_client_bin: /usr/local/bin/mc Installation path of the Minio server and client binaries. +```yaml +minio_server_release: "" +minio_client_release: "" +``` + +Release to install for both server and client; lastest if the default. +Can be 'RELEASE.2019-06-27T21-13-50Z' for instance. + ```yaml minio_user: minio minio_group: minio diff --git a/defaults/main.yml b/defaults/main.yml index 8dac2ba..60a753f 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,10 @@ minio_server_bin: /usr/local/bin/minio minio_client_bin: /usr/local/bin/mc +# Minio release to install. default if lastet +minio_server_release: "" +minio_client_release: "" + # Runtime user and group for the Minio server service minio_user: minio minio_group: minio diff --git a/tasks/install-client.yml b/tasks/install-client.yml index d055679..c95f7b4 100644 --- a/tasks/install-client.yml +++ b/tasks/install-client.yml @@ -1,8 +1,18 @@ --- -- name: Compose the Minio client download url +- name: Compose the Minio client download base url set_fact: - _minio_client_download_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch }}/mc" + _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: diff --git a/tasks/install-server.yml b/tasks/install-server.yml index 109bea8..9e2283b 100644 --- a/tasks/install-server.yml +++ b/tasks/install-server.yml @@ -1,8 +1,17 @@ --- - -- name: Compose the Minio server download url +- name: Compose the Minio server download base url set_fact: - _minio_server_download_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch }}/minio" + _minio_server_download_base_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch }}" + +- name: Compose the Minio server download url with lastest release + set_fact: + _minio_server_download_url: "{{ _minio_server_download_base_url }}/minio" + when: minio_server_release | length == 0 + +- name: "Compose the Minio server download url with release {{ minio_server_release }}" + set_fact: + _minio_server_download_url: "{{ _minio_server_download_base_url }}/archive/minio.{{ minio_server_release }}" + when: minio_server_release | length > 0 - name: "Get the Minio server checksum for {{ go_arch }} architecture" set_fact: