when i insert the values as a key for exmpl. path: ‘/usr/share/java-1.8.0/jre1.8.0_172/bin/javaws’ the task executes without any problem but when looping over i get “msg”: "The task includes an option with an undefined variable.i am suspecting that the value of the path is being parsed as an array [’
/usr/share/java-1.8.0/jre1.8.0_172/bin/javaws’]. Does anybody know what going wrong here and how can i get the loop working?
the error message is not mentioning which variable is undefined. I shifted the lists as you mentioned above but i am still getting the same error. Here is the complete error message:
The task includes an option with an undefined variable. The error was: ‘item’ is undefined
The error appears to have been in ‘/Ansible/roles/oracle-java-8/tasks/main.yaml’: line 39, column 3, but may
be elsewhere in the file depending on the exact syntax problem.