is not a valid attribute for a Play When ever you get the above error firstly crosscheck that the ansible attribute you have mentioned is correct. If it is correct then the issue probably is that you have created tasks as follows: --- - 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 == "" ) when it should be as follows: --- vars_prompt: - name: "var1" prompt: "Please pass variable" private: no tasks: - fail: msg="var1 is not passed or blank" when: var1 is undefined or ( var1 is defined and storeid == "" ) the example referenced is just a task. It is not a valid playbook because it is missings a hosts declaration and the module call is not under a tasks section. ERROR! conflicting action statements: fail, ...