Skip to content

Commit f546c83

Browse files
committed
multi arch support
1 parent 2c20611 commit f546c83

File tree

2 files changed

+32
-16
lines changed

2 files changed

+32
-16
lines changed

README.md

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ Available variables are listed below (located in `defaults/main.yml`):
1616

1717
```yaml
1818
mc_app: mc
19-
mc_os: linux
20-
mc_arch: amd64
21-
mc_dl_url: https://dl.min.io/client/{{ mc_app }}/release/{{ mc_os }}-{{ mc_arch }}/{{ mc_app }}
19+
mc_os: "{{ ansible_system | lower }}"
20+
mc_architecture_map:
21+
amd64: amd64
22+
arm: arm64
23+
x86_64: amd64
24+
armv6l: armv6
25+
armv7l: armv7
26+
aarch64: arm64
27+
32-bit: "386"
28+
64-bit: amd64
29+
mc_dl_url: https://dl.min.io/client/{{ mc_app }}/release/{{ mc_os }}-{{ mc_architecture_map[ansible_architecture] }}/{{ mc_app }}
2230
mc_bin_path: "/usr/local/bin/{{ mc_app }}"
2331
mc_file_owner: root
2432
mc_file_group: root
@@ -27,16 +35,16 @@ mc_file_mode: '0755'
2735
2836
### Variables table:
2937
30-
Variable | Description
31-
------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------
32-
mc_app | Defines the app to install i.e. **mc**
33-
mc_os | Defines os type. Used for obtaining the correct type of binaries based on OS type. Defaults to: **linux**
34-
mc_arch | Defines os architecture. Used to set the correct type of binaries based on OS System Architecture. Defaults to: **amd64**
35-
mc_dl_url | Defines URL to download the mc binary from.
36-
mc_bin_path | Defined to dynamically set the appropriate path to store mc binary into. Defaults to (as generally available on any user's PATH): **/usr/local/bin/mc**
37-
mc_file_owner | Owner for the binary file of mc.
38-
mc_file_group | Group for the binary file of mc.
39-
mc_file_mode | Mode for the binary file of mc.
38+
Variable | Description
39+
------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------
40+
mc_app | Defines the app to install i.e. **mc**
41+
mc_os | Defines os type. Used for obtaining the correct type of binaries based on OS type.
42+
mc_architecture_map | Defines os architecture. Used to set the correct type of binaries based on OS System Architecture.
43+
mc_dl_url | Defines URL to download the mc binary from.
44+
mc_bin_path | Defined to dynamically set the appropriate path to store mc binary into. Defaults to (as generally available on any user's PATH): **/usr/local/bin/mc**
45+
mc_file_owner | Owner for the binary file of mc.
46+
mc_file_group | Group for the binary file of mc.
47+
mc_file_mode | Mode for the binary file of mc.
4048
4149
## Dependencies
4250

defaults/main.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22
# defaults file for mc
33

44
mc_app: mc
5-
mc_os: linux
6-
mc_arch: amd64
7-
mc_dl_url: https://dl.min.io/client/{{ mc_app }}/release/{{ mc_os }}-{{ mc_arch }}/{{ mc_app }}
5+
mc_os: "{{ ansible_system | lower }}"
6+
mc_architecture_map:
7+
amd64: amd64
8+
arm: arm64
9+
x86_64: amd64
10+
armv6l: armv6
11+
armv7l: armv7
12+
aarch64: arm64
13+
32-bit: "386"
14+
64-bit: amd64
15+
mc_dl_url: https://dl.min.io/client/{{ mc_app }}/release/{{ mc_os }}-{{ mc_architecture_map[ansible_architecture] }}/{{ mc_app }}
816
mc_bin_path: "/usr/local/bin/{{ mc_app }}"
917
mc_file_owner: root
1018
mc_file_group: root

0 commit comments

Comments
 (0)