Kerberos authentication for Windows hosts only works with -vv or enabling logging in /etc/ansible/ansible.conf

Hello,

I have a very strange problem:

The situation:
One Microsoft domain controller (Windows 2012R2) and several Windows member servers joining this domain (also Windows 2012R2). The ansible server is installed/configured (krb5.conf and hostfile with the needed variables) with kerberos.

The problem:
I’m able to make a kerberos connection with de domain controller. If I try to make a connection with one of the member servers, I get the following error:

| UNREACHABLE! => {
“changed”: false,
“msg”: "kerberos: ",
“unreachable”: true
}

But the strange thing is, it is working when I enable logging:

  • if I add -vv (or -vvv, -vvvv) to the ansible-playbook command
  • if I enable logging in /etc/ansible/ansible.conf

Dees anyone have an idea how to solve this problem?

Thank you!

Ronald