Syntax highlighting detects an error and is getting confused for the rest of the source file when that king of source is used:
- name: Check that db_pass is the same everywhere
fail:
msg: "db_pass is not the same on every host"
when: hostvars[item]['db_pass'].stdout != hostvars[groups['camundahosts'][0]]['db_pass'].stdout
with_items: "{{ groups['camundahosts'] }}"
run_once: true
The error in this example appears right between the first hostvars[item] and ['db_pass'] (line 4 in the example) and it states:
Expected key-val pair or array item
After that, nearly everywhere in the file the following error is detected:
unexpected token at end of file
That source thought is exectuted without any error by ansible.
Hello,
Syntax highlighting detects an error and is getting confused for the rest of the source file when that king of source is used:
The error in this example appears right between the first hostvars[item] and ['db_pass'] (line 4 in the example) and it states:
After that, nearly everywhere in the file the following error is detected:
That source thought is exectuted without any error by ansible.
Thanks a lot for your help!