You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ogrosjeanne@bastion:~/ansible$ more prometheus-test.yml
- hosts: localhost
connection: local
roles:
- prometheus.prometheus.node_exporter
vars:
node_exporter_tls_server_config:
cert_file: /etc/node_exporter/certificate.cer
key_file: /etc/node_exporter/privateKey.pem
ogrosjeanne@bastion:~/ansible$ ansible-playbook prometheus-test.yml
PLAY [localhost] *********************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ***************************************************************************************************************************************************************************************************
ok: [localhost]
TASK [prometheus.prometheus.node_exporter : Validating arguments against arg spec 'main' - Prometheus Node Exporter] *****************************************************************************************************
fatal: [localhost]: FAILED! => {"argument_errors": ["Invalid type dict for option '{'cert_file': '/etc/node_exporter/certificate.cer', 'key_file': '/etc/node_exporter/privateKey.pem'}', elements value check is supported only with 'list' type", "Invalid type dict for option '{}', elements value check is supported only with 'list' type", "Invalid type dict for option '{}', elements value check is supported only with 'list' type"], "argument_spec_data": {"node_exporter_basic_auth_users": {"description": "Dictionary of users and password for basic authentication. Passwords are automatically hashed with bcrypt.", "elements": "str", "type": "dict"}, "node_exporter_binary_local_dir": {"description": ["Enables the use of local packages instead of those distributed on github.", "The parameter may be set to a directory where the C(node_exporter) binary is stored on the host where ansible is run.", "This overrides the I(node_exporter_version) parameter"]}, "node_exporter_disabled_collectors": {"description": ["List of disabled collectors.", "By default node_exporter disables collectors listed L(here,https://github.com/prometheus/node_exporter#disabled-by-default)."], "elements": "str", "type": "list"}, "node_exporter_enabled_collectors": {"default": ["systemd", {"textfile": {"directory": "/var/lib/node_exporter"}}], "description": ["List of dicts defining additionally enabled collectors and their configuration.", "It adds collectors to L(those enabled by default,https://github.com/prometheus/node_exporter#enabled-by-default)."], "type": "list"}, "node_exporter_http_server_config": {"description": ["Config for HTTP/2 support.", "Keys and values are the same as in L(node_exporter docs,https://github.com/prometheus/node_exporter/blob/master/https/README.md#sample-config)."], "elements": "str", "type": "dict"}, "node_exporter_textfile_dir": {"default": "/var/lib/node_exporter", "description": ["Directory used by the L(Textfile Collector,https://github.com/prometheus/node_exporter#textfile-collector).", "To get permissions to write metrics in this directory, users must be in C(node-exp) system group.", "B(Note:) More information in TROUBLESHOOTING.md guide."]}, "node_exporter_tls_server_config": {"description": ["Configuration for TLS authentication.", "Keys and values are the same as in L(node_exporter docs,https://github.com/prometheus/node_exporter/blob/master/https/README.md#sample-config)."], "elements": "str", "type": "dict"}, "node_exporter_version": {"default": "1.1.2", "description": "Node exporter package version. Also accepts latest as parameter."}, "node_exporter_web_listen_address": {"default": "0.0.0.0:9100", "description": "Address on which node exporter will listen"}, "node_exporter_web_telemetry_path": {"default": "/metrics", "description": "Path under which to expose metrics"}}, "changed": false, "msg": "Validation of arguments failed:\nInvalid type dict for option '{'cert_file': '/etc/node_exporter/certificate.cer', 'key_file': '/etc/node_exporter/privateKey.pem'}', elements value check is supported only with 'list' type\nInvalid type dict for option '{}', elements value check is supported only with 'list' type\nInvalid type dict for option '{}', elements value check is supported only with 'list' type", "validate_args_context": {"argument_spec_name": "main", "name": "node_exporter", "path": "/home/ogrosjeanne/.ansible/collections/ansible_collections/prometheus/prometheus/roles/node_exporter", "type": "role"}}
PLAY RECAP ***************************************************************************************************************************************************************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
The text was updated successfully, but these errors were encountered:
Dear community,
Migrating from cloudalchemy.node_exporter and a previous ansible version, my playbook fails to validate node_exporter_tls_server_config.
Regards
Olivier
The text was updated successfully, but these errors were encountered: