From 2eaa9d8913de37d0251213a93686e8d4dd9b06d7 Mon Sep 17 00:00:00 2001 From: paulfantom Date: Mon, 25 Jun 2018 15:36:37 +0200 Subject: [PATCH] initial multiarch support --- tasks/main.yml | 2 ++ tasks/preflight.yml | 12 ++++++++++++ vars/main.yml | 10 ++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 tasks/preflight.yml diff --git a/tasks/main.yml b/tasks/main.yml index 6c71fb0..b338379 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,4 +1,6 @@ --- +- include: preflight.yml + - name: add the python sni support to legacy python installations include: python_sni.yml when: diff --git a/tasks/preflight.yml b/tasks/preflight.yml new file mode 100644 index 0000000..a6fd1a6 --- /dev/null +++ b/tasks/preflight.yml @@ -0,0 +1,12 @@ +--- +- name: Compose Minio download url + set_fact: + minio_server_download_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}/minio" + when: + - minio_install_server + +- name: Compose MC download url + set_fact: + minio_client_download_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}/mc" + when: + - minio_install_client diff --git a/vars/main.yml b/vars/main.yml index 1dc9b27..3238c61 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,5 +1,7 @@ --- - -# Minio and MC download urls -minio_server_download_url: https://dl.minio.io/server/minio/release/linux-amd64/minio -minio_client_download_url: https://dl.minio.io/client/mc/release/linux-amd64/mc +go_arch_map: + i386: '386' + x86_64: 'amd64' + aarch64: 'arm64' + armv7l: 'arm' + armv6l: 'arm6vl'