Simplify go_arch setup

Move go_arch mapping to vars.
This commit is contained in:
Ben Kochie 2019-07-01 13:59:56 +02:00
parent 76a2df8045
commit 9317bcdd6b
No known key found for this signature in database
GPG Key ID: 7D88366AC0FCE38A
3 changed files with 6 additions and 4 deletions

View File

@ -2,9 +2,9 @@
- name: Compose the Minio client 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"
_minio_client_download_url: "https://dl.minio.io/client/mc/release/linux-{{ go_arch }}/mc"
- name: "Get the Minio client checksum for {{ go_arch_map[ansible_architecture] | default(ansible_architecture) }} architecture"
- name: "Get the Minio client checksum for {{ go_arch }} architecture"
set_fact:
_minio_client_checksum: "{{ lookup('url', _minio_client_download_url + '.sha256sum').split(' ')[0] }}"

View File

@ -2,9 +2,9 @@
- name: Compose the Minio server 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"
_minio_server_download_url: "https://dl.minio.io/server/minio/release/linux-{{ go_arch }}/minio"
- name: "Get the Minio server checksum for {{ go_arch_map[ansible_architecture] | default(ansible_architecture) }} architecture"
- name: "Get the Minio server checksum for {{ go_arch }} architecture"
set_fact:
_minio_server_checksum: "{{ lookup('url', _minio_server_download_url + '.sha256sum').split(' ')[0] }}"

View File

@ -5,3 +5,5 @@ go_arch_map:
aarch64: 'arm64'
armv7l: 'arm'
armv6l: 'arm6vl'
go_arch: "{{ go_arch_map[ansible_architecture] | default(ansible_architecture) }}"