Publication date: 2020-04-18
The following error message is shown "TypeError: a bytes-like object is required, not 'str'" on Debian Buster.
This is a known bug that got fixed in Ansible 2.7.10. Solution is thus to install a more recent Ansible version from backports repository instead of the package in the standard repository:
Add backports repository in "/etc/apt/sources.txt":
deb http://http.debian.net/debian buster-backports main contrib
Install the newer package from that repository:
apt update
apt install ansible -t buster-backports