try to install win_exporter..:

This commit is contained in:
L3D 2023-11-27 14:05:13 +01:00
parent a64df1bba1
commit ea0f51b14d
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 19 additions and 2 deletions

7
tasks/download.yml Normal file
View 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

View file

@ -3,7 +3,7 @@
when: win_exporter__version == "latest"
block:
- name: "Get latest windows_exporter release metadata"
ansible.builtin.uri:
ansible.windows.win_uri:
url: "{{ win_exporter__repo_api }}"
return_content: true
register: win_exporter__remote_metadata
@ -30,4 +30,5 @@
- name: "Generate windows_exporter download URL"
ansible.builtin.debug:
msg: "{{ win_exporter__version_target }}"
msg: "Install Version {{ win_exporter__version_target }}"
verbosity: 1

View file

@ -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
ansible.builtin.include_tasks: get_exporter_version.yml
- name: Download windows_exporter version
ansible.builtin.include_tasks: download.yml