Thanks for the inputs.

I noticed Event viewer.The WinRM service is not listening for WS-Management 
requests. 

 User Action 
 If you did not intentionally stop the service, use the following command 
to see the WinRM configuration: 

 winrm enumerate winrm/config/listener

Let me explain the things what I have done.

1. We provisioned a machine say hostname1, Ran 
ConfigureAnsibleForRemoting.ps1
2. Took standard image of that machine.
3.Provisioned new machine say hostname2 using that template
4. Noticing this winrm connection refused error randomly.
As per the event viewer, suggestion ran winrm enumerate 
winrm/config/listener
I see listener running on port 5986 has hostname mentioned as hostname1 . 
Will that be a reason for these connection issues ?

We are Configuring Ansibleremoting first and then taking image as we could 
not get an option to run this ConfigureAnsibleForRemoting powershell script 
at runtime. As these machines are provisioned runtime.

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9bb9ab79-5da5-461f-ac57-6dde8435c7f1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to