Skip to content

Commit

Permalink
Added support for arm64, armv7, i386 and i686 architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
LexVar committed Aug 5, 2021
1 parent 453404e commit f3b5c8b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ User-configurable defaults:

```yaml
# which version?
prometheus_version: 2.5.0
prometheus_version: 2.28.1
Expand Down Expand Up @@ -165,7 +165,7 @@ User-configurable defaults:

```yaml
# which version?
prometheus_node_exporter_version: 0.16.0
prometheus_node_exporter_version: 1.2.0
```
Additional command-line arguments, if any (use `node_exporter --help` to see the full list of arguments):
Expand All @@ -182,7 +182,7 @@ User-configurable defaults:

```yaml
# which version?
prometheus_alertmanager_version: 0.15.3
prometheus_alertmanager_version: 0.22.2
# directory for runtime database (currently for `silences.json`)
prometheus_alertmanager_db_path: /var/lib/alertmanager
Expand Down Expand Up @@ -336,6 +336,7 @@ None.
- [Robbie Trencheny](https://github.com/robbiet480) - contribute an early version of building binaries from Go source code.
- [Travis Truman](https://github.com/trumant) - contribute an early version of consul_exporter installer; now moved to [William-Yeh.consul_exporter](https://github.com/William-Yeh/ansible-consul-exporter).
- [Musee Ullah](https://github.com/lae)
- [Alexandre Rodrigues](https://github.com/LexVar)

## License

Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ prometheus_user: prometheus
prometheus_group: prometheus

prometheus_version: 2.28.1
prometheus_node_exporter_version: 0.16.0
prometheus_alertmanager_version: 0.15.3
prometheus_node_exporter_version: 1.2.0
prometheus_alertmanager_version: 0.22.2

gosu_version: "1.11"
prometheus_go_version: 1.11
Expand Down
2 changes: 1 addition & 1 deletion tasks/install-compile-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
set_fact:
prometheus_golang_tarball_url: "https://storage.googleapis.com/golang/go{{ prometheus_go_version }}.linux-amd64.tar.gz"
#prometheus_golang_tarball_url: "http://golang.org/dl/go{{ prometheus_go_version }}.linux-amd64.tar.gz"
when: ansible_userspace_bits == "64"
when: prometheus_platform_suffix == "linux-amd64"

- name: set internal variables for convenience
set_fact:
Expand Down
23 changes: 21 additions & 2 deletions tasks/set-role-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,34 @@
when: prometheus_use_service is not defined


# Architecture: x64_64, CPU bit: 64
- name: set internal variable platform-suffix for convenience
set_fact:
prometheus_platform_suffix: "linux-amd64"
when: ansible_userspace_bits == "64"
when: ansible_architecture == "x86_64"

# Architecture: arm64, CPU bit: 64
- name: set internal variable platform-suffix for convenience
set_fact:
prometheus_platform_suffix: "linux-arm64"
when: ansible_architecture == "aarch64"

# Architecture: armv7, CPU bit: 32
- name: set internal variable platform-suffix for convenience
set_fact:
prometheus_platform_suffix: "linux-386"
when: ansible_architecture == "armv7l"

# Architecture: 386, CPU bit: 32
- name: set internal variable platform-suffix for convenience
set_fact:
prometheus_platform_suffix: "linux-386"
when: ansible_architecture == "i386"

- name: set internal variable platform-suffix for convenience
set_fact:
prometheus_platform_suffix: "linux-386"
when: ansible_userspace_bits == "32"
when: ansible_architecture == "i686"


- block:
Expand Down

0 comments on commit f3b5c8b

Please sign in to comment.