I'm new to Ansible. Below is the small snippet of the playbook which I am trying to play but facing the error "ERROR! 'fail' is not a valid attribute for a Play"
---
- vars_prompt:
- name: "var1"
prompt: "Please pass variable"
private: no
- fail: msg="var1 is not passed or blank"
when: var1 is undefined or ( var1 is defined and storeid == "" )
I have tried multiple options found on stackoverflow but no success.
See Question&Answers more detail:os