WinRM Setup using Certificate

Hello everyone,

I am trying to automate the setup for winRM with certificate using ansible role, when I am trying to do that, at the end I am getting bellow error.

server6 | UNREACHABLE! => {
“changed”: false,
“msg”: “certificate: the specified credentials were rejected by the server”,
“unreachable”: true
}

I did the similar steps on bunch of windows server but manually and that’s working fine.

server5 | SUCCESS => {
“changed”: false,
“ping”: “pong”
}

any suggestion what could be the reason for getting this error?