--- - name: cat /etc/evolinux/todo.txt command: "cat /etc/evolinux/todo.txt" register: evolinux_todo changed_when: False failed_when: False check_mode: no - debug: var: evolinux_todo.stdout_lines when: evolinux_todo.stdout != "" - debug: msg: "There is nothing to do !" when: evolinux_todo.stdout == ""