Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

prometheus_node_exporter_textfiles_directory undefined #25

Closed
shaunrampersad opened this issue Oct 8, 2020 · 3 comments
Closed

prometheus_node_exporter_textfiles_directory undefined #25

shaunrampersad opened this issue Oct 8, 2020 · 3 comments

Comments

@shaunrampersad
Copy link

Hi

Version: v0.12.22

Hitting an issue with a variable being undefined.

The error was: 'prometheus_node_exporter_textfiles_directory' is undefined
The error appears to be in '../roles/mesaguy.prometheus/tasks/main.yml': line 2, column 3,

Docs describe the variables purpose, but there is no default set for it.


    prometheus_node_exporter_textfiles_directory: '/opt/prometheus/etc/node_exporter_textfiles'

Maybe this needs to be added to defaults?

@mesaguy
Copy link
Owner

mesaguy commented Oct 29, 2020

Confirmed, fixed with 7bd4036

@mesaguy mesaguy closed this as completed Oct 29, 2020
@f9n
Copy link
Contributor

f9n commented Dec 21, 2020

Same on v0.12.25

fatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'prometheus_node_exporter_textfiles_directory' is undefined\n\nThe error appears to be in '/home/packer/.ansible/roles/mesaguy.prometheus/tasks/main.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: Set global facts to be used inside and outside of role\n  ^ here\n"}

My usage:

    - role: mesaguy.prometheus
      vars:
        prometheus_manage_client_tgroups: false
        prometheus_components:
          - node_exporter

@dbolotin
Copy link

I confirm, the same error with:

prometheus_host: 10.43.15.1
prometheus_alertmanager_host: 10.43.15.1

prometheus_extra_opts:
  - '--storage.tsdb.retention=1y'

prometheus_components:
  - prometheus
  - alertmanager

on the latest release version (v0.12.25)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants