Fixing ‘KDC Reply Did Not Match Expectations’ Error in Ansible for Windows Server

When you connect to a Windows server with Ansible, you may see the error message “KDC reply did not match expectations while getting initial credentials”.

One possible reason is that the domain name that you used in the Ansible playbook command line doesn’t match the domain name that is configured in the Linux krb5.conf.

The domain name is case-sensitive.