Credentials getting rejected - packer with ansible on windows AMI

HI All,

I have been using the Packer pipeline to create a customized windows AMI from Amazon’s AMI as source. using amzon-ebs provider.
Letting packer to create a temporary key pair,
and using Administrator as the user and Auto generated password “{{.WinRMPassword}}” for rest of the packer pipeline.

after instance creation we are using ansible playbook to apply a full set of customization,
in the recent times , we see that
"Credentials rejected " message while playbook execution.

after multiple trials , 4 to 6 times of retires.
credentials are accepted and playbook is getting executed.

Hi Team,

I have not herd back on this , can somebody help me with this reqeust

The only thing that came to mind for me what that you were populating a variable when you login to see if it worked, then it uses that to work after that. wierd one.

Depending on what kind machine is building and how busy things are the time to get a wimrn server up might change. Could also be that you downsized the image and things are slightly slower.

Did you try to make the pause_before_connecting option longer ?

This should wait a little more and prevent this error.

Another thing you can do is have a provisioner that does nothing but retry a NOOP.