1 2 3 4 5 6 7 8 9 10
--- - hosts: all tasks: - name: check jq is not installed stat: path: /usr/bin/jq register: abc - fail: msg: "jq is already installed" when: abc.stat.exists == true