try to install win_exporter..:
This commit is contained in:
parent
a64df1bba1
commit
ea0f51b14d
3 changed files with 19 additions and 2 deletions
7
tasks/download.yml
Normal file
7
tasks/download.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: Install windows node_exporter
|
||||||
|
chocolatey.chocolatey.win_chocolatey:
|
||||||
|
name: prometheus-windows-exporter.install
|
||||||
|
version: '{{ win_exporter__version_target }}'
|
||||||
|
source: https://community.chocolatey.org/api/v2/
|
||||||
|
state: present
|
|
@ -3,7 +3,7 @@
|
||||||
when: win_exporter__version == "latest"
|
when: win_exporter__version == "latest"
|
||||||
block:
|
block:
|
||||||
- name: "Get latest windows_exporter release metadata"
|
- name: "Get latest windows_exporter release metadata"
|
||||||
ansible.builtin.uri:
|
ansible.windows.win_uri:
|
||||||
url: "{{ win_exporter__repo_api }}"
|
url: "{{ win_exporter__repo_api }}"
|
||||||
return_content: true
|
return_content: true
|
||||||
register: win_exporter__remote_metadata
|
register: win_exporter__remote_metadata
|
||||||
|
@ -30,4 +30,5 @@
|
||||||
|
|
||||||
- name: "Generate windows_exporter download URL"
|
- name: "Generate windows_exporter download URL"
|
||||||
ansible.builtin.debug:
|
ansible.builtin.debug:
|
||||||
msg: "{{ win_exporter__version_target }}"
|
msg: "Install Version {{ win_exporter__version_target }}"
|
||||||
|
verbosity: 1
|
||||||
|
|
|
@ -1,3 +1,12 @@
|
||||||
---
|
---
|
||||||
|
- name: 'Install python 3.12'
|
||||||
|
chocolatey.chocolatey.win_chocolatey:
|
||||||
|
name: python
|
||||||
|
version: '3.12.0'
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Get latest windows_exporter version
|
- name: Get latest windows_exporter version
|
||||||
ansible.builtin.include_tasks: get_exporter_version.yml
|
ansible.builtin.include_tasks: get_exporter_version.yml
|
||||||
|
|
||||||
|
- name: Download windows_exporter version
|
||||||
|
ansible.builtin.include_tasks: download.yml
|
||||||
|
|
Loading…
Reference in a new issue