import_tasks: install.yml
become: true
when:
( not __node_exporter_is_installed.stat.exists ) or
( __node_exporter_current_version_output.stderr_lines[0].split(" ")[2] != node_exporter_version ) or
( node_exporter_binary_local_dir | length > 0 )
tags:
node_exporter_install
Did you expect to see some different?
import_tasks: install.yml
become: true
when:
( not __node_exporter_is_installed.stat.exists ) or
( __node_exporter_current_version_output.stdout_lines[0].split(" ")[2] != node_exporter_version ) or
( node_exporter_binary_local_dir | length > 0 )
tags:
node_exporter_install
How to reproduce it (as minimally and precisely as possible):
Environment
Role version:
1.4.0-rc.0
Ansible version information:
ansible --version
Variables:
__node_exporter_current_version_output
Ansible playbook execution Logs:
TASK [cloudalchemy.node_exporter : Create the node_exporter group] *************************************************************************************************************************************
fatal: [rhea0109a.gaia.ucom.am]: FAILED! => {"msg": "The conditional check '( not __node_exporter_is_installed.stat.exists ) or ( __node_exporter_current_version_output.stderr_lines[0].split(\" \")[2] != node_exporter_version ) or ( node_exporter_binary_local_dir | length > 0 )' failed. The error was: error while evaluating conditional (( not __node_exporter_is_installed.stat.exists ) or ( __node_exporter_current_version_output.stderr_lines[0].split(\" \")[2] != node_exporter_version ) or ( node_exporter_binary_local_dir | length > 0 )): list object has no element 0\n\nThe error appears to be in '/home/andrey.grigorian/.ansible/roles/cloudalchemy.node_exporter/tasks/install.yml': line 8, 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: Create the node_exporter group\n ^ here\n"}
What happened?
err
_lines[0].split(" ")[2] != node_exporter_version ) or ( node_exporter_binary_local_dir | length > 0 ) tags:out
_lines[0].split(" ")[2] != node_exporter_version ) or ( node_exporter_binary_local_dir | length > 0 ) tags:Environment
Role version:
1.4.0-rc.0
Ansible version information:
ansible --version
Variables:
Anything else we need to know?: