diff --git a/roles/nvidia_gpu_exporter/defaults/main.yml b/roles/nvidia_gpu_exporter/defaults/main.yml index 1de2d5a7b..f0fac8b0c 100644 --- a/roles/nvidia_gpu_exporter/defaults/main.yml +++ b/roles/nvidia_gpu_exporter/defaults/main.yml @@ -11,5 +11,6 @@ nvidia_gpu_exporter_binary_install_dir: "/usr/local/bin" nvidia_gpu_exporter_system_group: "nvidia-gpu-exp" nvidia_gpu_exporter_system_user: "{{ nvidia_gpu_exporter_system_group }}" +nvidia_gpu_exporter_config_dir: "/etc/nvidia_gpu_exporter" # Local path to stash the archive and its extraction nvidia_gpu_exporter_local_cache_path: "/tmp/nvidia_gpu_exporter-{{ ansible_system | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" diff --git a/roles/nvidia_gpu_exporter/meta/argument_specs.yml b/roles/nvidia_gpu_exporter/meta/argument_specs.yml index 84abb199d..74ef9ed57 100644 --- a/roles/nvidia_gpu_exporter/meta/argument_specs.yml +++ b/roles/nvidia_gpu_exporter/meta/argument_specs.yml @@ -41,3 +41,6 @@ argument_specs: nvidia_gpu_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" default: "/tmp/nvidia_gpu_exporter-{{ ansible_system | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" + nvidia_gpu_exporter_config_dir: + description: "Path to directory with nvidia_gpu_exporter configuration" + default: "/etc/nvidia_gpu_exporter" \ No newline at end of file diff --git a/roles/nvidia_gpu_exporter/tasks/configure.yml b/roles/nvidia_gpu_exporter/tasks/configure.yml index 6b11e31fe..359e44c47 100644 --- a/roles/nvidia_gpu_exporter/tasks/configure.yml +++ b/roles/nvidia_gpu_exporter/tasks/configure.yml @@ -6,6 +6,7 @@ vars: _common_system_user: "{{ nvidia_gpu_exporter_system_user }}" _common_system_group: "{{ nvidia_gpu_exporter_system_group }}" + _common_config_dir: "{{ nvidia_gpu_exporter_config_dir }}" tags: - nvidia_gpu_exporter - configure diff --git a/roles/nvidia_gpu_exporter/test-requirements.txt b/roles/nvidia_gpu_exporter/test-requirements.txt deleted file mode 100644 index 7f0b6e759..000000000 --- a/roles/nvidia_gpu_exporter/test-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -bcrypt diff --git a/tests/integration/targets/molecule-nvidia_gpu_exporter-default/runme.sh b/tests/integration/targets/molecule-nvidia_gpu_exporter-default/runme.sh new file mode 100755 index 000000000..d094c3e1b --- /dev/null +++ b/tests/integration/targets/molecule-nvidia_gpu_exporter-default/runme.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +collection_root=$(pwd | grep -oP ".+\/ansible_collections\/\w+?\/\w+") +source "$collection_root/tests/integration/molecule.sh"