This role installs and configures the Prometheus DCGM Exporter.
See defaults/main.yml.
To use a fork of the default GitHub project:
dcgm_exporter_git_repo: "https://github.com/NVIDIA/dcgm-exporter.git"
To specify the install path:
dcgm_exporter_install_path: "/opt/dcgm-exporter"
To install a specific go version:
dcgm_exporter_go_version: "1.23"
To install a new release:
dcgm_exporter_version: "4.4.0-4.5.0"
To copy a config file:
dcgm_exporter_config_file: "{{ inventory_dir }}/templates/dcgm-exporter/custom-collectors.csv"
To add arguments to the executable:
dcgm_exporter_arguments: "-f /tmp/custom-collectors.csv"
Install and configure the exporter:
- hosts: computes
tasks:
- name: Import role pbouchez.dcgm_exporter
ansible.builtin.import_role:
name: pbouchez.dcgm_exporter
tags: role::dcgm_exporter