I have created a list and from that list i want to prepare some customise list as per my need.
But when i execute my playbook i get at last step when i want to see my customised list i get an error .
Can someone guide me where i am doing wrong.
* Use 'loop' instead of 'with_items'. See https://docs.ansible.com/ansible/latest/porting_guides/porting_guide_2.5.html#migrating-from-with-x-to-loop
* The variable 'item' is always defined in a loop (when not explicitly
renamed). The condition 'when: item is defined ...' is redundant. It is
enough to test e.g. 'when: item == "avenger"'
* The condition 'when: item != None' in the last task is also redundant. An
iteration will be skipped if the list is empty.
* Give a try to 'ansible-lint' and 'yamllint'