forked from cloudalchemy/ansible-node-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Same as cloudalchemy/ansible-alertmanager#83 and cloudalchemy/ansible-prometheus#239 but for Node exporter.
- Loading branch information
Showing
6 changed files
with
79 additions
and
27 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: | ||
# Version seeds to be specified here as molecule doesn't have access to ansible_version at this stage | ||
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-{{ 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-{{ version }}.linux-{{ go_arch }}.tar.gz" | ||
dest: "/tmp" | ||
creates: "/tmp/node_exporter-{{ version }}.linux-{{ go_arch }}/node_exporter" | ||
run_once: true | ||
check_mode: false | ||
|
||
- name: link to alertmanager binaries directory | ||
become: false | ||
file: | ||
src: "/tmp/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