Skip to content

Commit 97994c4

Browse files
Merge pull request #6 from darkwizard242/feature/multi-arch-support
Support multiple Architectures | Remove support for Ubuntu 18.04 and EL7
2 parents 1a7ed2e + f546c83 commit 97994c4

File tree

4 files changed

+33
-19
lines changed

4 files changed

+33
-19
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
strategy:
5252
max-parallel: 10
5353
matrix:
54-
IMAGE: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, ubuntu-18.04, rockylinux-8, centos-7, debian-bullseye, debian-buster]
54+
IMAGE: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, rockylinux-8, debian-bullseye, debian-buster]
5555

5656
steps:
5757

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

meta/main.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ galaxy_info:
1313
- noble
1414
- jammy
1515
- focal
16-
- bionic
1716
- name: Debian
1817
versions:
1918
- bullseye
2019
- buster
2120
- name: EL
2221
versions:
2322
- 8
24-
- 7
2523

2624
galaxy_tags:
2725
- mc

0 commit comments

Comments
 (0)