This repository has been archived by the owner on Mar 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add option to propagate binaries without access to internet (#126)
* add option to propagate binaries without access to internet Same as cloudalchemy/ansible-alertmanager#83 and cloudalchemy/ansible-prometheus#239 but for Node exporter. * Fix typo * Fix molecule/alternative/prepare.yml * Fix molecule/alternative/prepare.yml again :D * Fix _checksum not being defined * Use double quotes for consistency * Fix typo... * Fix c/p error
- Loading branch information
1 parent
c4d8c0e
commit efd7bc1
Showing
6 changed files
with
87 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
--- | ||
- name: Prepare | ||
hosts: all | ||
hosts: localhost | ||
gather_facts: false | ||
tasks: [] | ||
vars: | ||
go_arch: amd64 | ||
node_exporter_version: 0.18.1 | ||
tasks: | ||
- name: Download node_exporter binary to local folder | ||
become: false | ||
get_url: | ||
url: "https://github.com/prometheus/node_exporter/releases/download/v{{ node_exporter_version }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz" | ||
dest: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz" | ||
register: _download_binary | ||
until: _download_binary is succeeded | ||
retries: 5 | ||
delay: 2 | ||
run_once: true | ||
check_mode: false | ||
|
||
- name: Unpack node_exporter binary | ||
become: false | ||
unarchive: | ||
src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz" | ||
dest: "/tmp" | ||
creates: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter" | ||
run_once: true | ||
check_mode: false | ||
|
||
- name: link to node_exporter binaries directory | ||
become: false | ||
file: | ||
src: "/tmp/node_exporter-{{ node_exporter_version }}.linux-amd64" | ||
dest: "/tmp/node_exporter-linux-amd64" | ||
state: link | ||
run_once: true | ||
check_mode: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters