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
TASK [UnderGreen.prometheus-node-exporter : download prometheus node exporter binary] *********************************************************************** task path: /home/ansible/roles/UnderGreen.prometheus-node-exporter/tasks/main.yml:3 fatal: [server]: FAILED! => { "msg": "An unhandled exception occurred while templating '{% if prometheus_node_exporter_version | version_compare('0.13.0', '>=') %}https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% else %}https://github.com/prometheus/node_exporter/releases/download/{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% endif %}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: no filter named 'version_compare'. String: {% if prometheus_node_exporter_version | version_compare('0.13.0', '>=') %}https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% else %}https://github.com/prometheus/node_exporter/releases/download/{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% endif %}" }
Seems like version_compare filter has been deprecated in Ansible 2.9
The text was updated successfully, but these errors were encountered:
dgptamayo
changed the title
Version comparison logic used for downloading node exported binary fails on Ansible 2.9
Version comparison logic used for downloading node exporter binary fails on Ansible 2.9
Jan 3, 2020
The download task fails with this error:
TASK [UnderGreen.prometheus-node-exporter : download prometheus node exporter binary] *********************************************************************** task path: /home/ansible/roles/UnderGreen.prometheus-node-exporter/tasks/main.yml:3 fatal: [server]: FAILED! => { "msg": "An unhandled exception occurred while templating '{% if prometheus_node_exporter_version | version_compare('0.13.0', '>=') %}https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% else %}https://github.com/prometheus/node_exporter/releases/download/{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% endif %}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: no filter named 'version_compare'. String: {% if prometheus_node_exporter_version | version_compare('0.13.0', '>=') %}https://github.com/prometheus/node_exporter/releases/download/v{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% else %}https://github.com/prometheus/node_exporter/releases/download/{{ prometheus_node_exporter_version }}/{{ prometheus_node_exporter_release_name }}.tar.gz{% endif %}" }
Seems like
version_compare
filter has been deprecated in Ansible 2.9The text was updated successfully, but these errors were encountered: