ansible-playbook error "sudo: no tty present"

"sudo: no tty present and no askpass program specified"

If you run ansible-playbook and you get the error

fatal: FAILED! => {"changed": false, "failed": true, "module_stderr": "sudo: no tty present and no askpass program specified\n", "module_stdout": "", "msg": "MODULE FAILURE", "parsed": false}

you should edit ansible.cfg and change the line

pipelining = True

to

pipelining = false