ansible-blackbox-exporter icon indicating copy to clipboard operation
ansible-blackbox-exporter copied to clipboard

Error blackbox_exporter_configuration_modules must be a string

Open ns3777k opened this issue 3 years ago • 1 comments

What happened?

I installed the 0.9.3 role version, specify web listen address to be 127.0.0.1:9115 and after I ran a playbook, there was an error:

TASK [cloudalchemy.blackbox-exporter : configure blackbox exporter] ********************************************************************************************************************************************************************
fatal: [ax-monitoring]: FAILED! => {"changed": false, "msg": "AnsibleError: Unexpected templating type error occurred on (modules:\n  {{ blackbox_exporter_configuration_modules | to_nice_yaml(indent=2) | indent(2,False) }}\n): value must be a string"}

Did you expect to see some different?

Expected to see no errors.

How to reproduce it (as minimally and precisely as possible):

requirements.yml:

- name: cloudalchemy.blackbox-exporter
  version: '0.9.3'

playbook.yml:

- hosts: blackbox-exporter
  any_errors_fatal: True
  roles:
    - role: cloudalchemy.blackbox-exporter
      vars:
        blackbox_exporter_web_listen_address: "127.0.0.1:9115"

Run:

$ ansible-playbook -i inventories/remote.ini blackbox-exporter.yml

Environment

  • Role version:

    0.9.3

  • Ansible version information:

    2.9.16

  • Variables:

blackbox_exporter_web_listen_address: "127.0.0.1:9115"
  • Ansible playbook execution Logs:
TASK [cloudalchemy.blackbox-exporter : configure blackbox exporter] ********************************************************************************************************************************************************************
fatal: [ax-monitoring]: FAILED! => {"changed": false, "msg": "AnsibleError: Unexpected templating type error occurred on (modules:\n  {{ blackbox_exporter_configuration_modules | to_nice_yaml(indent=2) | indent(2,False) }}\n): value must be a string"}

Anything else we need to know?:

I tried to run this role without any variables and without any_errors_fatal: True, same result. I didn't find anything useful in issues. Thanks in advance.

ns3777k avatar Jan 03 '21 11:01 ns3777k

https://github.com/cloudalchemy/ansible-node-exporter/issues/158 Seems to be related.

ns3777k avatar Jan 03 '21 17:01 ns3777k

This role has been deprecated in favor of a the prometheus-community/ansible collection.

SuperQ avatar Mar 06 '23 15:03 SuperQ