cloudalchemy / ansible-node-exporter

Provision basic metrics exporter for prometheus monitoring tool
MIT License
500 stars 272 forks source link

Role doesn't work with Ansible 7.0.0 #276

Closed gygitlab closed 1 year ago

gygitlab commented 1 year ago

Hey. Looks like the role doesn't support Ansible 7.0.0 due to the following shell deprecation:

TASK [cloudalchemy.node_exporter : Gather currently installed node_exporter version (if any)] **********************************************************************************************
fatal: [node-1]: FAILED! => changed=false
  msg: 'Unsupported parameters for (ansible.legacy.command) module: warn. Supported parameters include: _raw_params, executable, strip_empty_ends, stdin_add_newline, creates, chdir, removes, stdin, _uses_shell, argv.'
piyoki commented 1 year ago

I am underging the same issue. Any solutions available?

nono-lqdn commented 1 year ago

You can just remove the part with

  args:
     warn: false

and replace it with a ignore_errors : false

This is because we are, in the task with the name "[ansible-node-exporter : Gather currently installed node_exporter version (if any)] ", we are trying to execute a shell command that might not exist. Thus we need to ignore errors.

nono-lqdn commented 1 year ago

I've pushed the fix I've applied locally.

vladget commented 1 year ago

+1

SuperQ commented 1 year ago

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